Fix guessing content-type for already-downloaded file.
Don't copy to cache when we've already got a cached copy.