Unit tests for the buffer output stream

The unit tests compiles, but doesn't link. I'll see if adding the file
loader code helps.