test phantomjs port instead of passively sleeping

this helps, first, when testing on the slow environments, so instead
of increasing 'wait' option and suffering the delay of these seconds,
one will wait only as long as it is required for phantomjs to come up