Updates per comments by @dirk-thomas

Remove shell keyword and call Popen with list of strings.
Remove extra : from PATH variable packing.
Fix indentation.
Use " to fix escaped single quotes.