check the existence of the path in rmdir