Better command quoting in subprocess calls and better troubleshooting.