Fix crash when material source uses Windows line endings.

* Also would crash if uniform in source used extra spaces or tabs.
Merge pull request #2048 from AnalyticalGraphicsInc/fixMaterialUniforms

Fix crash when material source uses Windows line endings.