title: issue - creating a directory with gradle not working
body: <p>I have the following <code>build.gradle</code>:</p>
  
  <pre><code>task wrapper(type: Wrapper) {
      gradleVersion = '2.0'
  }
  
  apply plugin: 'java'
  
  task filter(type: Copy) {
      def subdir = new File(project.buildDir, "subdir")
      println("subdir: "+subdir)
  
      if( !subdir.exists() ) {
          println("creating subdir")
  
          if(subdir.mkdirs()) {
              println("succeeded in making folder")
  
              if(subdir.exists()) {
                  println("folder exists")
              } else {
                  println("folder does not exist")
              }
          } else {
              println("failed to make folder")
          }
      } else {
          println("folder exists already")
      }
  }
  </code></pre>
  
  <p>After downloading the wrapper using <code>gradle wrapper</code> I then run:</p>
  
  <pre><code>/tmp/test $ ./gradlew clean filter
  subdir: /tmp/test/build/subdir
  creating subdir
  succeeded in making folder
  folder exists
  :clean
  :filter UP-TO-DATE
  
  BUILD SUCCESSFUL
  
  Total time: 4.121 secs
  </code></pre>
  
  <p>Which seems to indicate everything went okay.  However, when I double check I get this:</p>
  
  <pre><code>/tmp/test $ ls -l /tmp/test/build/subdir
  ls: /tmp/test/build/subdir: No such file or directory
  </code></pre>
  
  <p><em>Notes</em>:</p>
  
  <ul>
  <li>This is on MacOS Mavericks.</li>
  <li>The executing user is able to create the directory at the shell.</li>
  <li>There is sufficient disk space.</li>
  </ul>
  
  <p>Please advise what I might be doing wrong here with Gradle that fails to create the directory, but that Gradle indicates it was successful?  Any troubleshooting tips would be appreciated.</p>
  
  <p>Thanks!</p>