def clean_path(path, strip = None, **kwargs):
    """
    Cleans a path

    **Arguments:**
        :*path*:  Initial path string
        :*strip*: Potential endings to remove from path

    **Returns:
        :*cleaned*: Cleaned path
    """
    cleaned = path

    if   strip is None:           strip  = []
    elif isinstance(strip, str):  strip  = [strip]

    for s in strip:
        if cleaned.endswith(s):
            cleaned = cleaned[:cleaned.index(s)]

    cleaned = ("/" + cleaned + "/").replace("//", "/")
    return cleaned