Set the exit status for the process correctly when compilation fails

Use the result of ts.executeCommandLine() as the node process' exit
status.

Can you point me at the right place to add a test for this?

Fixes #245