Fix throwing exception from emitFile
Merge branch 'fixThrowExceptionOnEmitFile' of https://github.com/Microsoft/TypeScript into fixThrowExceptionOnEmitFile