core: support overriding environment

Useful for distro settings.

Change-Id: Ib619c87ac41374ef5007beb3d6de068fcfeb3ff5
Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>