restore trailing newline

this also fixes the no "close" event on node ~0.11.2