Exit before stdout flush on Windows

I am suffering an issue on Windows 8 where stdout isn't flushed. This is a pretty well known problem https://github.com/joyent/node/issues/3584 but it's still unclear what the best solution is. I'm using `fs.writeSync` here to make blocking writes to stdout, which seems to solve the issue, but perhaps this isn't ideal?