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

File lock might be better for those who run proxy in other stacks than webrick perhaps?

Finally :-) This was super annoying.