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

I'm not using optimizations. But with the modified code in my last comment, foo is being used (after user presses a key), and the behavior is the same.