added host to update.sh

We have to be able to apply changes to a host different than localhost
Also added error checking for git commands