Added debug logging to testing and dev for PhantomJS. This provides more...

... insight in its behaviour.