fixing caching bug in facter(), NPE in meets_constraint?() and adding basic unit tests for #46