Add a file or directory to the context tarball.

        :param name: File or directory path.
        :type name: unicode | str
        :param args: Additional args for :meth:`tarfile.TarFile.add`.
        :param kwargs: Additional kwargs for :meth:`tarfile.TarFile.add`.

def add(self, name, arcname=None, **kwargs):
        """
        Add a file or directory to the context tarball.

        :param name: File or directory path.
        :type name: unicode | str
        :param args: Additional args for :meth:`tarfile.TarFile.add`.
        :param kwargs: Additional kwargs for :meth:`tarfile.TarFile.add`.
        """
        if os.path.isdir(name):
            exclusions = get_exclusions(name)
            if exclusions:
                target_prefix = os.path.abspath(arcname or name)
                kwargs.setdefault('filter', get_filter_func(exclusions, target_prefix))
        self.tarfile.add(name, arcname=arcname, **kwargs)