Disambiguate between files and directories