fixes #6289: avoids concurrent downloads of files with the same name and destination dir.

Given the lock file is now the actual file, will this not delete the file as soon as it's downloaded?