Make extension loading more verbose and fix loading when non-root.

Built on https://github.com/cfengine/core/pull/1435.

Removed some initial logging, because those parts are only used for testing anyway, and are therefore unnecessary. Also rearranged the logic a bit, because we must take care not to mix the loading we do when testing with the loading we do in the wild. Otherwise a machine that has CFEngine on it could make the test pass, even when it should fail.