(#21868) use RbConfig to determine the lib dir

Paired with changes to facter and puppet (and what else?) in osx/file_mapping.yaml, in a separate pull req