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

I don't know if it matters, but I would leave these guards out. They aren't in the other `pre/` headers.