Fixed: using stat to check if a file is a directory in DirectoryFiles.cpp