An Itô formula for local dirichlet processes