Fix temp directory trailing slash correction.