Bugfix for remote branch in checkrepo script

Before the script worked for remotes with the following setup:
remotes/origin/HEAD   -> origin/master
remotes/origin/master

Now it works also for remote with only (no HEAD):
remotes/origin/master