Rewrite remote url checking to remove possibility of infinite loop.
url_for_fetching is the correct remote to check against.
Merge pull request #32 from square/remote-url-fixes

Remote url fixes