Refs #969 - Foreman-side changes for serving templates from the proxy

Needs the proxy-side PR to function.

This is a rebase of @GregSutcliffe's original https://github.com/theforeman/foreman/pull/751.
@eLobato first raise was a typo..left it in by accident.
would you re-raise as a foreman exception or just let it throw as it is.

on the second would you re-raise as foreman exception or just log the error?