Corrected variable name and global class DirectoryIterator instanciation