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

Is that with optimizations on?  I can see here on Mavericks that with optimizations turned on, `foo` is optimized away--presumably because it's not being used.