What happens when the sub-folder is not empty? `rmdir` removes only empty folders.
I think that we should we call `$this->removeAll($path->__toString(), true);` instead of `rmdir($path->__toString());`