Make sure stdout/stderr are fully drained before exiting a test

Ugly ugly hack workaround for node bug in Windows.

I don't know how to test this really. There are other tests that actually fail
before this fix so I guess it's kindof alright to go without extra tests.
Merge pull request #62 from pereckerdal/dont-directly-exit

Make sure stdout/stderr are fully drained before exiting a test