Use util.inherits for functional prototypes, fixes #1

This solves #1, it looks like writing to the stream wasn't working because it "inherited" from the same instance of Stream. I added `util.inherits` and corrected prototyping, so that works now.