Use putenv() instead of clumsy do-it-yourself in execute_script.