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