Force using the pathOfCurrentFile until a better way is known. At least this works 100% of the time (on supported browsers).