Raise on missing templates

This raise only occurs if a templateName or
layoutName is explicitly specified and the
template does not exist.

Closes #1869
Closes #1870
Closes #1889
Closes #1890