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

>  Also the build did not pick up that I had added this file initially

Sorry, I should have mentioned you need to run `make cmake` whenever a new file is added. That bit me before too, it's frustrating. I've been meaning to add a sanity check that tries to warn about this.

> triggered by me messing around in test/includes/CMakeLists.txt

That's exactly right, Cmake will used its cached configuration until something changes (or you run `make cmake` which does this for you).