Check for errors in GLSL shaders using glslangValidator

Please ignore the first 3 commits and instead review them in #956.
shader.write_to_file path