Safe file and directory removal