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

Add a TODO and i'll move it to os_defs.h after the merge.