Changes to allow WANT_JSON to allow JSON to non-Python modules
Improve variable smushing so it only has to be done in one place.   This is related to shlex.split being called
on untemplated variables in some rare cases.