Only try to remove the tmp file if we actually created one
Merge remote-tracking branch 'origin/4.3' into 4.3
Patch from LIGO: ensure that cp src and dst is not already the same file
Merge branch '4.3'