Move all purging logic to add_file_to_purge()

Further simplify expectations.