Improve error handling in process startup in js testing framework.
Yet another fix for process shutdown on Unix.