code: function createStream (tmpIn, tmpOut, callback) {
    var incoming = new stream.PassThrough()
    var outgoing = new stream.PassThrough()
    // input paramter of the child process
    var result = duplexMaker(incoming, outgoing)
    setTimeout(function () {
      inStream(incoming, tmpIn, function (err) {
        if (err) {
          result.emit('error', err)
        } else {
          callback.call(result, tmpIn || incoming, tmpOut || outgoing, function (err) {
            if (err) {
              result.emit('error', err)
              if (tmpIn) {
                fs.exists(tmpIn, function (exists) {
                  if (exists) {
                    fs.unlink(tmpIn)
                  }
                })
              }
              if (tmpOut) {
                fs.exists(tmpOut, function (exists) {
                  if (exists) {
                    fs.unlink(tmpOut)
                  }
                })
              }
              return
            }
            // tmpFile is not needed anymore
            if (tmpIn) {
              fs.unlink(tmpIn)
            }
            if (tmpOut) {
              fs.exists(tmpOut, function (exists) {
                if (exists) {
                  var out = fs.createReadStream(tmpOut)
                  out.pipe(outgoing)
                  out.on('end', function () {
                    fs.unlink(tmpOut)
                  })
                } else {
                  result.emit('error', new Error('Child process has not created the output-temp file'))
                }
              })
            }
          })
        }
      })
    })
    return result
  }
docs: Base function to create streams of something, if values are provided for tmpIn (or tmpOut),
  these are passed to the callback function. If not, the input stream (or the output stream) are used instead.
  
  @param tmpIn path to a tempfile to write input stream input to before calling the callback,
  if this is null, the stream input is directly
  @param tmpOut path to a tempfile to which the
  @param callback function(tmpOrInputStream, tmpOrOutputStream, callback(err)) the callback is called whenever the input
  is available. The "result" parameter is the duplex stream actually returned by this function.
  @returns {Stream}