title: Can't move file after background download: "No such file"
body: <p>I have an app using a <code>backgroundSessionConfiguration</code> instance of <code>NSURLSession</code> to handle some <code>NSURLSessionDownloadTask</code> tasks. The tasks are created correctly, and finish downloading, but in <code>URLSession:downloadTask:didFinishDownloadingToURL:</code> when I go to move the downloaded file from <code>location</code> to a permanent spot on disk, I sometimes (read: often) get the error:</p>
  
  <pre><code>NSUnderlyingError=0x178247890 "The operation couldn’t be completed. No such file or directory"
  </code></pre>
  
  <p>It's as though the downloaded file is being cleared out of the temp directory (../Library/Caches/com.apple.nsnetworkd/..) before I get a chance to move it.</p>
  
  <p>Running the operation for the same remote file will behave both ways with all other factors being equal, so I haven't been able to identify anything that would cause it to sometimes work.</p>
  
  <p>Is there anyway to ensure that this file will stick around long enough to move it into place once it's done?</p>
  
  <p>Edit: I'm also seeing this with some frequency for normal (not background) sessions as well</p>