Determine head correctly

There are probably nicer ways to do this, but it works.
This fixes an issue when trying to create a pull request for a
repository which is part of an organisation such that the username
does not match. E.g. b4mboo/trash <--> some_org/trash