Simplify execute_script(). It will probably work under Windows as well.