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

I think this is desirable, but let's also remove the "size is MAXPATHL" frament as well as the "size is IOSIZE" fragment 2 lines above. Try to make this comment fit on line 825.