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

`converts pa*th glob to ^pa.*th$ regex`