def sanity_checker(iter):
# Todo: make this better.... write a regex for the types of things that are valid?
for gaf in iter:
if gaf.path.startswith("/") or ".." in gaf.path:
raise ValueError("Bad path found in archive: {}".format(gaf.path))
yield gaf