Clean up temporary directories after use