Demo for query storing

Change-Id: I947bcac841992c3f6cfd01ab337c265b0d01cb70
diff --git a/node_modules/fs-mkdirp-stream/index.js b/node_modules/fs-mkdirp-stream/index.js
new file mode 100644
index 0000000..cde5e19
--- /dev/null
+++ b/node_modules/fs-mkdirp-stream/index.js
@@ -0,0 +1,50 @@
+'use strict';
+
+var through = require('through2');
+
+var mkdirp = require('./mkdirp');
+
+function toFunction(dirpath) {
+  function stringResolver(chunk, callback) {
+    callback(null, dirpath);
+  }
+
+  return stringResolver;
+}
+
+function define(options) {
+
+  function mkdirpStream(resolver) {
+    // Handle resolver that's just a dirpath
+    if (typeof resolver === 'string') {
+      resolver = toFunction(resolver);
+    }
+
+    function makeFileDirs(chunk, enc, callback) {
+      resolver(chunk, onDirpath);
+
+      function onDirpath(dirpathErr, dirpath, mode) {
+        if (dirpathErr) {
+          return callback(dirpathErr);
+        }
+
+        mkdirp(dirpath, mode, onMkdirp);
+      }
+
+      function onMkdirp(mkdirpErr) {
+        if (mkdirpErr) {
+          return callback(mkdirpErr);
+        }
+
+        callback(null, chunk);
+      }
+    }
+
+    return through(options, makeFileDirs);
+  }
+
+  return mkdirpStream;
+}
+
+module.exports = define();
+module.exports.obj = define({ objectMode: true, highWaterMark: 16 });