Made Git PS1 stuff more robust.