code: def get_base_path(path):
          
          if "%" not in path:
              return path
  
          path = os.path.split(path)[0]
  
          while "%" in path:
              path = os.path.split(path)[0]
  
          return path
docs: Determines the longest possible beginning of a path that does not
          contain a %-Symbol.
  
          /this/is/a/pa%th would become /this/is/a
  
          :param str path: the path to get the base from
          :return: the path's base