Initial support for reading virtual files in /r

This adds support for "flat" and "thumbnail" in r/