Python: simplify IO redirection
PHP: fix __BOND_eval breaking exported values (fixes output redirection).