fixes #3955 - added param_true? and snippet_if_exist template methods

And improved unit tests of (safe) renderer