After renaming file_path_to_url because it doesn't handle directories
correctly, I realised it was being used for directories in xmlbase. So
this fixes that. I didn't really want it to check the filesystem but
might have to do so. Proper fix coming up later.