Fixup Scm and its test.

Support environments like travis-ci with no proper user config:
  setup a repo identity in test
Fixup _get_remote implementation (kill quoting) and test.