def stripPathCruft(path):
    """Strip cruft from a path name."""
    if not path:
        return path
    if len(path) > 2 and (path[0] == '<' and path[-1] == '>' or path[0] ==
        '"' and path[-1] == '"' or path[0] == "'" and path[-1] == "'"):
        path = path[1:-1].strip()
    return path
