Fixing parsing of directories.