Mechanism of the Reaction of Imido Esters with Amines