Temporal Score Rescaling for Temperature Sampling in Diffusion and Flow Models