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

I moved this to `globals.h` to fix the build. `MAXPATHL` can also be defined in `nvim/os_unix_defs.h` So I am not sure if this change is good enough or if more needs to be done.