core: support overriding environment

Useful for distro settings.

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