Towards Reliable Code-as-Policies: A Neuro-Symbolic Framework for Embodied Task Planning