Fix to work with a bundled AppleScript
Cleanup editSelectedFileInTerminal.applescript
Use quoted form of the parameter filename