title: Node-horseman Unhandled rejection evaluate
body: <p>I'm trying to write a basic web scraper with Node-horseman, but I'm getting some issues with CSS selectors inside the <em>evaluate</em> function. With some websites the <em>evaluate</em> function works just fine, but with others, Node throws an error.</p>
  
  <p>For example:</p>
  
  <pre><code>var Horseman = require('node-horseman');
  var horseman = new Horseman();
  
  function getTitle() {
    var title = $('.product-name-main h1').text();
    return {title: title};
  }
  
  horseman
    .userAgent('Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0')
    .open('http://shtoraoptom.ru/pokryvalo-nazsu-gul-abrikosovyj-240-260-sm')
    .evaluate(getTitle) 
    .then(function(title){
      console.log(title);
      return horseman.close();
    });
  </code></pre>
  
  <p>This code throws an error:</p>
  
  <pre><code>Unhandled rejection getTitle evaluate
  
  global code evaluateJavaScript@[native code] evaluate@phantomjs://platform/webpage.js:390:39 phantomjs://code/bridge.js:121:61    at Horseman.&lt;anonymous&gt; (/home/ubuntu/workspace/node_modules/node-horseman/lib/actions.js:839:38)
      at Horseman.tryCatcher (/home/ubuntu/workspace/node_modules/node-horseman/node_modules/bluebird/js/release/util.js:16:23)
      at Promise._settlePromiseFromHandler (/home/ubuntu/workspace/node_modules/node-horseman/node_modules/bluebird/js/release/promise.js:502:31)
      at Promise._settlePromise (/home/ubuntu/workspace/node_modules/node-horseman/node_modules/bluebird/js/release/promise.js:559:18)
      at Promise._settlePromiseCtx (/home/ubuntu/workspace/node_modules/node-horseman/node_modules/bluebird/js/release/promise.js:596:10)
      at Async._drainQueue (/home/ubuntu/workspace/node_modules/node-horseman/node_modules/bluebird/js/release/async.js:143:12)
      at Async._drainQueues (/home/ubuntu/workspace/node_modules/node-horseman/node_modules/bluebird/js/release/async.js:148:10)
      at Immediate.Async.drainQueues [as _onImmediate] (/home/ubuntu/workspace/node_modules/node-horseman/node_modules/bluebird/js/release/async.js:17:14)
      at processImmediate [as _immediateCallback] (timers.js:383:17)
  </code></pre>
  
  <p>When I try to rewrite the code another way using the same selector, it logs out the title correctly:</p>
  
  <pre><code>var Horseman = require('node-horseman');
  var horseman = new Horseman();
  
  function getTitle() {
    var title = $('.product-name-main h1').text();
    return {title: title};
  }
  
  horseman
    .userAgent('Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0')
    .open('http://shtoraoptom.ru/pokryvalo-nazsu-gul-abrikosovyj-240-260-sm')
    .text('.product-name-main h1')
    .then(function(title){
      console.log(title);
     return horseman.close();
    });
  </code></pre>
  
  <p>What can be the reason for this type of error?</p>