Study of the electronic properties of Cu 2 O thin films by X-ray absorption spectroscopy