Added method localFileNameClash

Also reordered the implementations a bit.
Check for case clash on downloads.
Use the moved implementation of the name clash detection method.