fixed a bug with apply_affine
tests now remove added files