Complex Monge-Ampère equations and geodesics in the space of Kähler metrics