Clean up temporary directory in test tasks