Strip out ^[[2K and ^[[0G in tmux output

^[[2K^[[0G means "clear line and move to the first column". They clutter up the
output and should be stripped from it.

Closes #86.
Add check for haslocaldir()
Work around zshenv dependent on $SHELL

References #94.
Merge remote-tracking branch 'upstream/master'