Generalized Ellipsometry for Surfaces with Directional Preference: Application to Diffraction Gratings*