Fix temp directory cleanup.