Rejoin args list into a string for run_command when using an unsafe shell

This allows the use of an args list with leading environment variables,
which otherwise would fail due to the way Popen works.