Fixed an issue with the temporary file

I had an issue where I was leaving some 'ssh' processes running because I wasn't
managing the control socket correctly.  This fixes that.