Fixing two most annoying issues

Shuttle is a great app, but it has lack of options in working with iTerm. And also it leaves an open terminal session after closing connection creating a mess of tabs or windows.
I've tried to fix it.