Wait for stdout to drain before exiting.

If stdout is not flushed when process.exit() is called, buffered output will may reach the tty. 

Problem was observed when running on Cygwin on Windows 7.