Borrowed and modified archive_util commands from setuptools.