Filter files when looking for directories.