base: File API

Missing:

* Docs as docbook, fix typos etc
Ouch, that led me down a bit of a rabbit hole.  I have removed the cache, which led to the need to expose the tags so that people can implement their own cache.

I think the new API is slightly less convenient, but quite a bit more explicit and less complex.