import pathlib


def sanitize_path(path):
    """Sanitize a path. Returns a pathlib.PurePath object. 
    If a path string is given, a PurePath object will be
    returned. All relative paths will be converted to 
    absolute paths.
    """
    pure_path = pathlib.Path(path).resolve()
    return pure_path