Only update git if we are in a separate repo

@danmaclean This PR puts in a simple check that the data repository is actually a git repo. Required as otherwise the data would get put into the main code repo.