Update Generator.php

Prevent Generator::removeDir from generating warnings