A Third Order Numerical Method for Doubly Periodic Electromegnetic Scattering