fix handling of :branch option of gem.conf

fix handling of :branch option of gem.conf