Two-dimensional Dirac fermions in a mass superlattice