Allow passing an env var hash to commands

This updates the `Command` class to take a hash for passing env
variables. These are passed to the `popen4` call and are set as
environment variables for the child process. This allows passing
sensitive env vars like passwords without putting them in the
command string.