Adjusted getFileNames, added getDirectoryNames()