Updated git prompt code to be more portable