title: Casperjs and Failed to save screenshot with captureSelector
body: <p>I have such code :</p>
  
  <pre><code>  casper.thenOpen(url, function() {
      this.echo('Opening at ' + width);
      //give some time for the page to load
      casper.waitFor(function check() {
        return this.evaluate(function() {
          return document.querySelectorAll('#browse-packshots').length &gt; 0;
        });
      }, function then() {
        //set the viewport to the desired height and width
        this.viewport(width, height);
        //Set up two vars, one for the fullpage save, one for the actual viewport save
        var FPfilename = saveDir + '/fullpage-' + width + ".png",
            ACfilename = saveDir + '/' + width + '-' + height + ".png";
  
        //Capture selector captures the whole body
        this.captureSelector(FPfilename, 'body');
        //capture snaps a defined selection of the page
        this.capture(ACfilename,{top: 0,left: 0,width: width, height: height});
        this.echo('snapshot taken');
      },function timeout() {
        this.echo("Too long . No screenshot taken").exit();
      },10000);
    })
  </code></pre>
  
  <p>Casper version is 1.0.4 on Mac. When I want to use captureSelector I'm getting </p>
  
  <pre><code>[error] [phantom] Failed to save screenshot to fullpage-1440.png;
                    please check permissions...
  </code></pre>
  
  <p>With capture there is no problem. I event try with sudo but with no effect.</p>