Fix circle.yml writing before creating directory

> bash: line 11: /tmp/circle-junit.Ntahqgj/mocha/xunit.xml: No such file or directory

https://218-598343-gh.circle-artifacts.com/0//tmp/circle-artifacts.sJFztDN/stderr_mkdir_17190.txt
diff --git a/circle.yml b/circle.yml
index 6f1dde9..0a162f0 100644
--- a/circle.yml
+++ b/circle.yml
@@ -73,10 +73,10 @@
     # apparently truncates custom data in their test result reports, so instead
     # we POST to this trivial Node server on localhost:9000 that writes the
     # body of any POST request to $CIRCLE_TEST_REPORTS/mocha/xunit.xml
+    - mkdir -p $CIRCLE_TEST_REPORTS/mocha
     - ? |-
-        {
-          mkdir -p $CIRCLE_TEST_REPORTS/mocha
-          node << 'EOF'
+        node << 'EOF' >$CIRCLE_TEST_REPORTS/mocha/xunit.xml \
+                      2>$CIRCLE_ARTIFACTS/mocha-test-report.log
           require('http').createServer(function(req, res) {
             res.setHeader('Access-Control-Allow-Origin', '*');
             req.pipe(process.stdout);
@@ -85,7 +85,6 @@
           .listen(9000);
           console.error('listening on http://0.0.0.0:9000/');
         EOF
-        } >$CIRCLE_TEST_REPORTS/mocha/xunit.xml 2>$CIRCLE_ARTIFACTS/mocha-test-report.log
       :
         background: true