Boron Doped diamond films as electron donors in photovoltaics: An X-ray absorption and hard X-ray photoemission study