code: def build_files(payload, dirname=None, indent=4, tabs=False, header=False):
      
      if dirname is None:
          dirname = os.getcwd()
  
      for config in payload['config']:
          path = config['file']
          if not os.path.isabs(path):
              path = os.path.join(dirname, path)
  
          # make directories that need to be made for the config to be built
          dirpath = os.path.dirname(path)
          if not os.path.exists(dirpath):
              os.makedirs(dirpath)
  
          # build then create the nginx config file using the json payload
          parsed = config['parsed']
          output = build(parsed, indent=indent, tabs=tabs, header=header)
          output = output.rstrip() + '\n'
          with codecs.open(path, 'w', encoding='utf-8') as fp:
              fp.write(output)
docs: Uses a full nginx config payload (output of crossplane.parse) to build
      config files, then writes those files to disk.