code: def save_tiles(tiles, prefix='', directory=os.getcwd(), format='png'):
      
  #    Causes problems in CLI script.
  #    if not os.path.exists(directory):
  #        os.makedirs(directory)
      for tile in tiles:
          tile.save(filename=tile.generate_filename(prefix=prefix,
                                                    directory=directory,
                                                    format=format), 
                                                    format=format)
      return tuple(tiles)
docs: Write image files to disk. Create specified folder(s) if they
         don't exist. Return list of :class:`Tile` instance.
  
      Args:
         tiles (list):  List, tuple or set of :class:`Tile` objects to save.
         prefix (str):  Filename prefix of saved tiles.
  
      Kwargs:
         directory (str):  Directory to save tiles. Created if non-existant.
  
      Returns:
          Tuple of :class:`Tile` instances.