Use stderr instead of throwing errors

... inside of PhantomJS. This avoids a stream error.

Fix a race condition with setting/clearing the timeout