Friendly error when pull-request in detached HEAD

This PR fixes #291 by showing an informative error message when trying
to pull-request in a detached HEAD.