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

Check error and error.code before assuming stderr means errors.
Fixes #69