code: def path_expand(cls, path):
          
          current_dir = "." + os.path.sep
          if path.startswith(current_dir):
              cwd = str(os.getcwd())
              path = path.replace(current_dir, cwd, 1)
          location = os.path.expandvars(os.path.expanduser(path))
          return location
docs: expands the path while replacing environment variables, ./, and ~/
          :param path: the path to be expanded
          :type path: string
          :return:the new path
          :rtype: string