Current-induced local oxidation of metal films: Mechanism and quantum-size effects