Fix: doesn't work with ssh persistent connections
Fix a typo in session existence checking
Fix target window specification for new-window command