Fix improper tests

Mocha's async callback was being called twice. There was also name
conflicts.
Split text stream by lines