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

Would it be cleaner if I pulled this work out into a new pull? (`NameBuff` static allocation)