Using mortars to upscale permeability in heterogeneous porous media from the pore to continuum scale