add rmpath and fix rmdir input structure