X-ray absorption spectroscopy study of local dynamics and thermal expansion inReO3