ScriptGenerator: improve filename formatting

The ellipsis present at the end of many commands makes the
script name look suboptimal in OMERO.web, so we strip it out.