Bugfix: avoid replacing "/home/user-alt" by "~-alt"

Add escaped backslashes so as to replace the "/home/user/" string in the path by "~/"
Add case for screen title escape chars
Suppress double escape in screen title
Add more generic test for screen/byobu/tmux title