Allow running arbitrary commands to connect weechat to the script

In particular, this allows spawning a new SSH session for every command. When combined with key authentication, this provides better security than forwarded TCP ports in multi-user environment. Additionally, this pullrequests contains some minor other improvements.