Add tests for buffer.c and fileio.c