download.sh: fix clone function not switching to the right branch