Use cp "close" event instead of "exit"
This ensures that all of the stdio streams of the cp have ended before exiting, should fix node v0.11.x.