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

__Done__ Added a comment. Let me know if it works for you.