In the code for the browser platform, applicationDirectory is defined as location.origin + "/", which with file URLs resolves to simply file:///.
Clearly, the root of the filesystem is not generally going to be the application's directory.
It could be tricky to figure out the right value to use here. But it would be better to indicate a lack of support (null?) than to return an obviously wrong value.