Don't propagate ThreadKilled exceptions upwards and run the main IO action in the main thread

Also exit with a failure exit status on errors.
Convert UserInterrupt into a QUIT message and exit gracefully