Merged executeScript functions and added skipping of escaped variables.

Merged the two executeScripte functions by simply passing null into
the second one. No additional logic will be executed if the args array
is empty.

Also replaced the parsing via the for loop with a regular expression
which fetches *unique* occurences of all variables. It also honors
escaped variables (\$).