script templates: add error line printing

Ought to make debugging a bit easier.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>