Change re to shlex

Using re in Python is a losing proposition. Let's use the tools that Python excels in.