@jgbi. Thanks for your contribution. That is quite an interesting code snippet. Looks good.
Basically, for those who didn’t understand what you did, by setting root to true, you are telling the plugin to use JURI::root instead of JURI::base to create the full path to files.