Complete rewrite of the tarsnapit script