Use detached HEAD

Prevents switching a local branch to an unrelated remote branch.
And makes sense to just use a detached HEAD since script
supports specification of tags or hashes to build packages from.

Change-Id: I8ed80801aa98cd05fbe941a7deeee80161971b0d