Add a RecursiveDirectoryIterator::UNIX_PATHS. This should fix the problem with the file separator on windows systems and unix systems. See #175