tpl: added test case for template with spaces and newlines (closes #2)