Made safe_rm fail on directories