unit tests for files.c