Added "return" parameter to publish method.

Passing TRUE to the publish method's 3rd parameter returns the published
template as a string instead of sending it to the output buffer.