phantomas.getDOMPath throws 'null' is not an object

Fixes #160