Added several tests for filemanager.c