Fix GetOutputFilename not expanding output filename properly