Remove the usage of files in the public API, use URIs everywhere.

This makes unit tests much easier as URIs can be resources on the classpath.