Adapt to https: git URLs
Check error and error.code before assuming stderr means errors.
Fixes #69
Merge pull request #2 from johnjbarton/codereview-tweaks

Adapt to https: git URLs and allow branches named ..error...