Incorporate the tmux escaping into GetEscapeCode.
Make the reseting the cursor work under tmux.

We need to reset the cursor before leaving termcap mode under tmux,
otherwise it doesn't take.