function getHeaderVersion(filename) {
    const twglVersionRE = / (\d+\.\d+\.\d+) /;
    return twglVersionRE.exec(fs.readFileSync(filename, {encoding: 'utf8'}))[1];
  }
Replace %(id)s in strings with values in objects(s)

Given a string like `"Hello %(name)s from %(user.country)s"`
and an object like `{name:"Joe",user:{country:"USA"}}` would
return `"Hello Joe from USA"`.

@param {string} str string to do replacements in
@param {Object|Object[]} params one or more objects.
@returns {string} string with replaced parts