An “absolute” href has a scheme. If you have an absolute file -path- that starts with a slash, that will always look like a relative URL to the HTML parser. You need to put file:// in front of your operating system absolute file path. Like file:///usr/local/somefile.txt (3 slashes total in front).
file:// urls can only be opened from other local file documents. Web pages loaded from an http: or https: url aren’t allowed to load these for security reasons.
I haven’t looked at this script in a while, but I need it again, so I’ll check if I added the file:// protocol … It would be typical for me to overlook that obvious detail.