Unify slashes in URIs derived from files

This change ensures that URIs, which are derived from filenames, use forward slashes on Unix as well as on Windows systems.