truncate the last N bytes of a stream - Node.js module