Remove _wrap.

Think this is easier to understand, and easier to adopt for functions
that take different command line arguments (e.g. pexpect).

Also support preserve_environment argument.