rmdir function is added, some bugs need to be fixed