An Optic Solution for the Measurement of Gas Diffusion in Thin Films