Docker/Openshift/Kubernetes mount the config file as a symbolic link and IsDir returns true if the file is a symlink. Before calling IsDir, the symlink should be resolved to determine if it points at a file or directory. Fixes #3753