Fix #563 -- Some custom template funcs cannot be used in JavaScript cont...

This fix essentially allows the functions which *always* return nothing (i.e. `set` and `append`) to be used within the context of JavaScript.

I explain in #563 but basically by returning `template.HTML`, the template engine will insert quotes if these methods are used within a `<script>` element or a `.js` file (not sure about that one, but I read a SO question where someone was encountering that).