Simplify the definition of getOutputFilename
Make codeOutput panic if hscTarget is HscInterpreted

Doesn't look like it causes any failures in the full test suite, so
presumably it's fine!