Fixed recursive directory removing on Windows

RecursiveIterator variable should be destroyed to make rmdir
work instantly, before we will try to remove parentDir.
Fixes [UnexpectedValueException] during composer update command
on Windows system.