auto-guess output filename from the script filename