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

Found an even more complete link: http://www.opensource.apple.com/source/cvs/cvs-19/cvs/lib/system.h