Merge pull request #1 from teampants/develop

Handle various additional detached head checkout scenarios.
Add versionOr* methods to make it easier to have a fallback version