Emit 'end' when piping.
Ignore temp file created by test.
Merge pull request #239 from timoxley/bug/pipe-end-event

Emit 'end' when piping.