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

@domcleal: sure, but then it will be accessible via tftp, not sure if that's a big deal though.