def strip_exts(s, exts):
    """
    Given a string and an interable of extensions, strip the extenion off the
    string if the string ends with one of the extensions.
    """
    f_split = os.path.splitext(s)
    if f_split[1] in exts:
        return f_split[0]
    else:
        return s
Given a string and an interable of extensions, strip the extenion off the
    string if the string ends with one of the extensions.