Safe file delete.
Merge pull request #3926 from adobe/glenn/safe-delete

Safer version of file deleting