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

The Stack Overflow link referenced by @justinmk says most of it really (refreshing to read). As long as they're (supposed to be) ints, enums seems better because they're true constants. Then we can also keep the switch, which looks cleaner. Otherwise, the extra lua header is better until I can update the Lua-C parser to handle simple `#define`'s properly.