Local Action Functionals and the Classical Master Equation