'Extracts the archive to a temporary directory and sets
`toppath` to that directory.'

def extract(self):

    for (path_test, handler_class) in self.handlers():
        if path_test(util.py3_path(self.toppath)):
            break
    try:
        extract_to = mkdtemp()
        archive = handler_class(util.py3_path(self.toppath), mode='r')
        archive.extractall(extract_to)
    finally:
        archive.close()
    self.extracted = True
    self.toppath = extract_to
