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

> Can't we allocate NameBuf in mch_early_init() and that will allow the tests to work?

Technically, yes. Though I see absolutely no reason to not have it as a static array because that's what it is. It's there for the duration of the program. Perhaps we should lightly comment what we're doing at the `gen_expand_wildcards` callsites.