def _tarfile_path_join(path, fn):
    """Replacement for os.path.join that always uses forward slashes.

    Due to this bug in Python tarfile https://bugs.python.org/issue21987 we may
    or may not have a trailing backslash in the provided path. Rather than
    checking the exact length, which could lead to backwards incompatibilities,
    we simply strip trailing slashes and always add them back.
    """
    path = path.rstrip('/')
    return path + '/' + fn
