Fix broken core grains detection in localclient

A stacktrace was being thrown and swallowed in the core os detection
because there was no __file__ attribute when run via localclient.

Refs #13920
Lint
Merge pull request #14744 from cachedout/13920

Fix broken core grains detection in localclient