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

* Regexp changed to allow dashed in branch names.