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

Works for me. Wasn't sure if the moving `MAXPATHL` around was going to get complicated or not. Is there anything I need to change based on the discussion above?