code: def build_dirs(files):
      '''
      Build necessary directories based on a list of file paths
      '''
      for i in files:
          if type(i) is list:
              build_dirs(i)
              continue
          else:
              if len(i['path']) > 1:
                  addpath = os.path.join(os.getcwd(), *i['path'][:-1])
                  subdirs = all_subdirs(os.getcwd())
                  if addpath and addpath not in subdirs:
                      os.makedirs(addpath)
                      print 'just made path', addpatf build_dirs(files):
      '''
      Build necessary directories based on a list of file paths
      '''
      for i in files:
          if type(i) is list:
              build_dirs(i)
              continue
          else:
              if len(i['path']) > 1:
                  addpath = os.path.join(os.getcwd(), *i['path'][:-1])
                  subdirs = all_subdirs(os.getcwd())
                  if addpath and addpath not in subdirs:
                      os.makedirs(addpath)
                      print 'just made path', addpath
docs: Build necessary directories based on a list of file paths