Adds missing rmdir in function dirclear