Add -g option to specife an alternaty repo URL for git install type.

* Regexp changed to allow dashed in branch names.