Bug 1033402 - waitForSocket() before connecting to marionette.

It would be straight up duplication if I had done copy/paste.