added support for directory removal