Fixed logic bug.

Though it's not necessarily wrong to first clear to location to where to
file is copied to, it's not needed. Because copy() will overwrite just as
well as rename() will. Also cleaning up the original file after is a good
idea, it will then mimic rename(). This was the intention with for this
patch all along.