[hot-fix] Malicious repo can overwrite any file on disk (#1429)
* Add regression test
* add protections + fix tests
* fix widnwso test
* fix widnwso test
* FIX resolving path without following symlinks
* increase pause time in test
* fix windows test
* Update src/huggingface_hub/file_download.py