Respect current tmux status line, unset bright when leaving git directory, and only load code when relevant

I made a few changes when I was trying out your code. The quick fix for un-setting the `bright` style attribute is particularly important, I think. Only loading the script when `$TMUX` is set becomes necessary when using my solution for getting the currently set status line, but it's also a good idea in general when tmux provides such an easy way to check if you're inside of it or not.

I actually am not using this right now, even though I got it working properly, since I felt a slowdown and I discovered that the native git solution at https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh is so much faster.