Fixes #495. Give higher precedence to env specified in JSON file, over shell environment.