Make sure program names are encoded before using them to invoke subprocesses.