Add error checking to git commands

Failure to update submodules (among other things) are a pain to debug
so don't just carry on in case of git errors.