When finding java and ruby absolute paths, check if result is empty

If not found, the exec method in Facter>=2.0.0 returns an empty
string instead of nil, which results in errors like these:

```Could not retrieve fact='nr_java_found', resolution='<anonymous>':
undefined method `start_with?' for nil:NilClass```