Check and report on syntax errors when saving screen templates.

Finding syntax errors in screen templates can be really tough, and really annoying. If you've ever added an extra } bracket or missed a ; at the end of the line, you'll appreciate getting a warning when saving the template so you know exactly which line the problem is on.