Fixed some variable substitution issues, unicode help?

I've fixed a few misc variable substation issues reported recently.

In doing so, I had to cast a string as string (not unicode) so I could split it successfully, because the templates come out as unicode objects now (which is probably good).

I have to be careful though as you can't shlex.split a unicode string on some python versions, so when we template the options line, we can't parse it so terribly easily, and I also have to utf-8 encode the module file options.

http://bugs.python.org/issue6988

As a result, a unicode parameter to a module "action" line, not a template, is going to get mangled.

I'm going to fiddle with this a bit more, but could use some additional eyes on this, especially from those that are likely to send non-ASCII data. Is this even an issue if
copy/template aren't affected? Perhaps not.

Anyway, for those that would like to look, additional eyes would be welcome.

--Michael

Progress!

I've figured out how to transfer things cleaner -- don't base64 encode
the MODULE_ARGS.

I have to update various modules to mention the Python file contains
an encoding, which I've already done with command, but it seems to be
better now.

Still, testing and evolution welcome.

templates still work, the real question is just about unique stuff in
variables that will be used in "action" lines, which is definitely a
corner case -- and may not have really worked before anyway, and maybe
nobody is trying that.

Not base64 encoding and such makes this considerably faster, which is
also good.

--Michael