Fix misuse of !r string formatting when building command line strings/lists

Where cli strings are being used then use single quotes:
You want to run `mkdir '/foo\ bar'` not `mkdir '/foo\\ bar'.

Where cli lists are being used then don't quote at all, subprocess handles this already:

    >>> subprocess.list2cmdline(['mkdir', 'foo\ bar'])
    'mkdir "foo\\ bar"'

I've left all log/error/exception messages as is.