The logic to use a domain name was being applied to file:// paths, causing only the first directory to be used.