Translated list2cmdline from subprocess.