Remove temp files using the iterator pattern