Write a file I/O module.

TODO: Refactor all mentions of struct _fmi / fm_index; C will currently
recognize them as separate types which will complicate passing them around
(well, I can always cast them to and from void*)