Reorganize unit tests
Allow for some buffering in the read/write streams