Finite‐element solution of three‐dimensional periodic waveguide problems