docs: def _ensureDir(dir_name):
      """Create dir_name as a directory if it does not exist. If it
      exists, make sure that it is, in fact, a directory.
  
      Can raise OSError
  
      str -> NoneType
      """
      try:
          os.makedirs(dir_name)
      except OSError, why:
          if why.errno != EEXIST or not os.path.isdir(dir_name):
              raise