Ensure no stdout output is lost

Fixes #120

See https://github.com/joyent/node/issues/3737 for more info.