Add error handling for all stream methods that take a function.

Partly solves #94.
Call test.equal in the right order.
Merge pull request #97 from vqvu/catch-buggy-fn

Add error handling for all stream methods that take a function.