Encode path only for old versions of hfh
_The documentation is not available anymore as the PR was closed or merged._
Next version of `huggingface-hub` 0.11 does encode the `path`, and we don't want to encode twice