base: File API

Missing:

* Binary files
* File removals
* Unit tests
* Docs as docbook, fix typos etc
What happens when the parser throws an exception? What is the expected behavior of a file object in this case?