#6507: Make sure old file exists before doing things to it.
Merge pull request #6618 from openscholar/6507-deleted_file

Make sure old file exists before doing things to it.