Prevent the check for update to be run while one is already in progress.
version.sh: Improve the handling of the branch name.

The branch name was cut when on no branch.