Fixed recursive directory removing on a Windows

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