A high precision technique to correct for residual atmospheric dispersion in high-contrast imaging systems