Environment support

Add support for consistent environment handling, to allow overrides like GIT_SSH

Signed-off-by: Robin H. Johnson <robbat2@orbis-terrarum.net>