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

> statically-allocated arrays are not assigned real memory until they are accessed

@aktau Are you sure that's what is happening and it's not simply being optimized away because it's unused?  I suspect it is... at least if you're compiling with `-O2`.