Fixed bug with temp dir lifetime
Added test for correct cleanup of atomic file generator temp dir