Added some tests for FileUtils and fixed some bugs in listFilesInDir()