Redmine#3839: add sys.local_dirname

Attempt to resolve https://cfengine.com/dev/issues/3839

Uses `sys.local_dirname` as the variable name.

Possible issues:

* needs to be verified to ensure I'm passing the right parameters for `LoadPolicyInputFiles`
* relies on `realpath` which is not everywhere.  It may need a Windows or alternative implementation.