Close a file before we attempt to move it.