Make the git prompt magic a bit more robust to avoid the issues @tsion had with his prompt and newer versions of git.