Fix issue #278. Fall back to (default) branch for context data, if no branch selected

This should fix #278.

If no branch was selected (ctx.Repo.BranchName is empty) fall back to default branch.
Also check if the default branch exists (being a little bit overcautious) and if not fall back to some other branch.