fixes #8376
rewind iterator before iteration starts
refs #8376; added comment and applied patch on other files
refs #8376; spaces=>tabs
refs #8376; spaces=>tabs
Merge pull request #8377 from youngguns-nl/issue_8376

RecursiveDirectoryIterator does not work on NFS