Exit should wait for stdout (joyent/node#1669).