Fix hub when branch name contains slash. (#27960)
Summary:
fixes https://github.com/pytorch/pytorch/issues/27844
Pull Request resolved: https://github.com/pytorch/pytorch/pull/27960
Differential Revision: D17964360
Pulled By: ailzhang
fbshipit-source-id: f5054fc251d2ebbf09ea4ea9fa4d1ce87db5fc52