Fixed dir.buildGitURI and added a test spec

Protocols needed to be flipped