check javascriptEnabled status in the page

 * checks javascriptEnabled status, before `evaluating` JS
 * fixes #841
 * updated `tests`, to reflect this behaviour