Don't replace path prefixes with matching variable names.

'%d' expands to the current path. '%~' expands to the current path,
but replaces '/a/b/c' with ~ABC if there happens to be a variable
named ABC which contains '/a/b/c'. While that's neat, I don't actually
like it.
Make numerous improvements to my Tmux function.

This is all much trickier than I had anticipated.
Do smarter guessing about UTF-8 support.

If TERM is 'xterm', then fancy characters are supported.
If TERM is 'screen' and DISPLAY or SSH_TTY is defined, then fancy
characters are probably supported.

The only case that this actually fails for me is when starting Tmux
from a 'linux' term, then ssh-ing into another machine. In that case
TERM is 'screen' and SSH_TTY is defined, but fancy characters still
aren't supported.