updated rmdir operation