Modelling the escape of Lyman continuum photons from galaxies in the Epoch of Reionization