[WIP/RFC] Add unit tests for buffer.c and fileio.c

Yea, that's the process I went through to get the code where its at. Fun stuff.