Fixed function that remove dirs because can't remove non empty dirs