Bugfix git_pillar (__env__ related)

Fixes bug that shows up when caches are cleared.
Use dict.get in stead of __getitem__ to catch missing values
in opts.
Merge pull request #18574 from keesbos/bugfix-__env__

Bugfix git_pillar (__env__ related)