title: Psake and robocopy failing
body: <p>Robocopy will exit with a code above 0 and still possibly not be a failure. PSake detects anything above 0 as a failure and fails the build. This is fine, but how come this <em>still</em> fails:</p>
  
  <pre><code>task Deploy {    
          robocopy $source $dest /NP /S /XO /NFL /NDL /NJH /NJS | Out-Default
  
      if ($lastexitcode -eq 3)
      {
         Write-Host "Got Here"
         $lastexitcode = 0       
      }
  
      Write-Host "Deploy local complete"
      Write-Host $lastexitcode
  }
  
  TaskTearDown {  
      if ($LastExitCode -ne 0) {
          write-host "Build failed"
          exit 1
      }
  }
  </code></pre>
  
  <p>I can verify that the Deploy if statement is hit and the Write-Host outputs 0, correctly, yet the TaskTearDown still detects the last exit code as 3!  How do I fix this? </p>