Throw an error when parsing a bad script

If a script has a missing bracket (for example), currently
it is silently ignored, except by [source]

Signed-off-by: Steve Bennett <steveb@workware.net.au>