Bug 1033402 - waitForSocket() before connecting to marionette.

Also it depends on ````this.onScriptTimeout```` which we don't have in here.