Fixed the Filesystem methods for a directory with a name that is a substring of a another directory