Only invoke mocha once per stream

This pull request will only invoke mocha once per stream, leading to cleaner build output.

I also updated the code to use a Transform stream as it seemed to more closely represent what was happening with the Duplex stream.