[Download] Don't write the ref file in snapshot_download dry runs (#5345)
`snapshot_download(..., dry_run=True)` wrote `refs/<revision>` to the cache.
Skip that write in dry-run mode, like `hf_hub_download` and the tree cache
write already do.
Co-authored-by: Lucain <lucain@huggingface.co>