title: npm posttest doesn't trigger if npm test fails
body: <p>Is there a way to trigger npm's posttest when test fails?  If package.json contains</p>
  
  <pre><code>"scripts": {
    "pretest": "echo pretest",
    "test": "some_failed_test_or_error",
    "posttest": "echo posttest"
  }
  </code></pre>
  
  <p><code>$ npm test</code> will echo "pretest" but not "posttest".</p>
  
  <p>I get the same behavior if I use mocha and a test fails, even if mocha doesn't trigger any exceptions (just some simple failure <code>assert(true==false)</code>).</p>
  
  <p>I'm launching a resource on pretest, and I'd like to kill the resource on posttest, whether the test itself passes or fails.</p>
  
  <p>MacOS OS X 10.9.4, npm version 1.4.21, node v0.10.30.</p>