Generalize error detection to work with both Node.js and io.js.
Generalize error detection to work with both Node.js and io.js.

Flimm/check-pages,Flimm/check-pages,DavidAnson/check-pages,DavidAnson/check-pages