Directory no longer returning duplicate entries

This should fix a few failures in the behat test suite, caused by some issues with the Directory class and the iterator that it uses internally.