Fixed function name in generated script to escape characters when needed

Funcster would not tolerate certain characters in the name of functions. This patch will escape all function names as appropriate so as to permit otherwise acceptable characters.