If you have used the Adobe Photoshop script called "Load Files into Stack...", you likely have noticed it pollutes the layer names with the file extension of the files it pulls in. If you then run Altia PhotoProto or some other script that uses a layer name to create a file name, it adds an extra file extention, creating for example, .png.png vs just .png in the outputted file name. It is a simple 1-line change to the Adobe "CreateImageStack.jsx" script (attached) to fix this issue.
The fix was simply adding the .replace to line 411:
app.activeDocument.activeLayer.name = this.fName.replace(".png","");
You can apply this fix yourself, or copy the attached file to:
C:\Program Files\Adobe\Adobe Photoshop CC (64 Bit)\Presets\Scripts\Stack Scripts Only\CreateImageStack.jsx
Additionally, there are some other scripts both from Adobe and end users that are helpful for renaming layers. Find some of them below:
http://www.ps-bridge-scripts.talktalk.net/ (Layer Name Editor).
This script has even more options: