Rewrite branch fetching.
Move git stuff to fetch_teuthology_branch()