Fix git checkout

If the branch does not exist locally, create it properly.
Otherwise the script will abort with freshly checkout sources.

Change-Id: I05960ed862fa61f3c9435f6749d941128812887b