Is the temporary directory removed at the end of the calculation? I do not see where.