Should use `WP_CLI::launch()` or at least proc_open(), instead of those kooky redirects.