Use URI in the public API, not File

Allows to e.g. run tests to use resources on the classpath, not files on the filesystem.