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

That create a strange discrepancy between which `pre` headers are preprocessed and which aren't. Any ideas @jszakmeister?