Change directory for git initialization and add failure checking