@tapi. Thanks for posting that. That is strange, since I tested it. Nonetheless, I will look into it and post an update later today. I believe that all that is needed is to add:
jimport(‘joomla.filesystem.folder’);
To the top of the file. If you are comfortable with editing php files, please add this line and give me some feedback as to whether it worked.