Merge pull request #549 from nulltoken/fix/open-repo-with-workdir-path Fix trailing slash issue to the gitdir path when the repo is opened through a workdir