docs: def listrecursive(path, ext=None):
      """
      List files recurisvely
      """
      filenames = set()
      for root, dirs, files in os.walk(path):
          if ext:
              if ext == 'tif' or ext == 'tiff':
                  tmp = fnmatch.filter(files, '*.' + 'tiff')
                  files = tmp + fnmatch.filter(files, '*.' + 'tif')
              else:
                  files = fnmatch.filter(files, '*.' + ext)
          for filename in files:
              filenames.add(os.path.join(root, filename))
      filenames = list(filenames)
      filenames.sort()
      return sorted(filenames)