tryclient: Fix off-by-one error when finding current git branch

Git branches' complete names follow the form "refs/heads/<branchname>".
Branchnames may contain additional slashes. Therefore, we need to split
up to two times (three pieces) if the last piece is to contain the
complete branch name.

Without this patch, when the branch "dev/newstuff"
("refs/heads/dev/newstuff", to be exact) has the remote "origin", it
would get mangled into "origin/newstuff" - as that's not the same
branch, the try job would fail.