Improved the surface normal calculation to handle cases where the surface parameterization causes a degenerate surface. Fixes #13.