Fix path handling on windows

Using the File class is no good idea to handle URI path under windows.
By using the more appropriate URI class, we won't have platform specific
problems with paths.