Update script will not git pull if HEAD is detached