Fix too long WindowsFileLock name
Fix WindowsFileLock name longer than allowed MAX_PATH by shortening the basename.
Windows users should disable the max path length limit. It's a nightmare to handle it.
Also the lock path must not be changed in a random way. Otherwise from another process the lock path might not be the same and the locking mechanism won't work. Do you agree with handling the case where MAX_PATH is not disabled? If not, we can close this PR.

If so, would it work a deterministic lock path instead of random? I'd rather not handle this at all, since there will be other places in the code where the limit will break things