An EXAFS investigation of the local structure of R8Mg42Zn50 icosahedral quasicrystals (R=Y, Dy)