Current fluctuations in the transient regime: An exact formulation for mesoscopic systems