Reverses the order in which shell_env and prefix are applied to a command.
Fixes #1135. Command prefix is applied before shell_env.
Reverses the order in which `shell_env` and `prefix` are applied to a command.
I think this will go into 1.11 since it's a "big" change for a bugfix.