Sorts files in a directory based on a XML file that represents a directory structure.