Fix for Issue #6872

Take II:

Issue #6872

[JSBin showing error behavior](http://jsbin.com/osacec/2/)

Also:
Added phantomjs to devDependencies
Test port configurable.