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

The `buffer.moon` file segfaults. I do not understand why. Any pointers would be appreciated.