Fix #3165 Ralsh (bin/puppet resource) can't manage files
This is based on the patch submitted by Owen Smith.
File management was being blocked by two problems: an obsolete, broken
instances method for the file type,
and a bug in the way resource/ral handled slashes in resource names.
This patch makes two changes to Owen's version:
- our unit tests caught an
unexpected ruby quirk:
"text/".split("/")
and
"text/".split("/", 2)
do not return the same values.
- File.instances now reproduces the old behavior of listing files in
the root directory. This is now implemented in terms of the existing
file recursion feature.