title: Set working directory in gulpfile.js?
body: <p>Is there a way to set the working directory for Gulp within a gulpfile, so that I can run a gulp command from a subdirectory without running into any issues? I ran a search for this and didn't find what I was looking for.</p>
  
  <p>To clarify, I'm aware of adding a prefix to the files I'm using. However, instead of this - </p>
  
  <pre><code>var gulp = require('gulp');
  var jshint = require('gulp-jshint');
  ...
  
  var paths = {
      js: [__dirname + 'app/*/*.js', __dirname + '!app/lib/**'],
      css: __dirname + 'app/*/*.styl',
      img: __dirname + 'app/img/*',
      index: __dirname + '*.html',
      dist: __dirname + 'dist'
  };
  </code></pre>
  
  <p>I'd like to do something like this:</p>
  
  <pre><code>var gulp = require('gulp');
  var jshint = require('gulp-jshint');
  ...
  
  gulp.cwd(__dirname); // This would be much easier to understand, and would make future edits a bit safer.
  
  var paths = {
      js: ['app/*/*.js', '!app/lib/**'],
      css: 'app/*/*.styl',
      img: 'app/img/*',
      index: '*.html',
      dist: 'dist'
  };
  </code></pre>
  
  <p>I'm wondering if Gulp exposes this functionality. Perhaps node itself allows this.</p>
  
  <p>(I realize that there is likely a way to do command line itself when I run the command, but I would like to include it in the gulp file, especially for distribution purposes. I want the working directory for gulp to match the directory in which the gulpfile resides.)</p>
  
  <p>Thanks!</p>