make it possible to reference a branch of a local git repository

Reasoning on why this change is wanted can be found
on the "sbt-dev" mailing list,
topic "problem with referencing a local git repository"
This is a personal preference, but I prefer `Option(uri.getRawFragment).isDefined` over `null` in the code.