very important point.
my opinion is that we should focus on the script-side security (a safe script instead of a safe scripting engine).
i give two reasons for this:
1. total prevention is hard or impossible to achieve: i can use {.save.} to create a batch file with "ren my hfs.diff.tpl", and the {.exec.}
even if you would want to detect the string, i can split it in two parts, and use {.append.}
so, on this side, it seems to be a battle already lost.
2. being able to manipulate hfs.diff.tpl can be an interesting opportunity for useful features in scripts.
that's why i think this way, the problem is giving such power to the wrong user.
working on this side, we may try to mark unsafe scripts (on the forum, or in a repository), or alerting about the intended audiance (admin, occasional surfers, etc), or giving commands to ease the making of safe scripts.