Show console command only in debug mode.
Allow temporarily setting ENV to enter debug mode.
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
Merge pull request #75 from xystushi/review_130910_show_console_command_in_debug_mode

Show console command only in debug mode.