Updated exit.js to use callback from empty write instead of drain event

This commit fixes #4

Fix was tested in Windows 7 and 8 in cmd, powershell, and git-bash.

I also tested the original issue with a hanging build on TeamCity and the full test was reported without hanging.