Keldysh action of a multiterminal time-dependent scatterer