Add Folder/Path to 'Recent Folders' through script

I have been making scripts to automatically export sprites from my aseprite files, and have been using the Dialog to select folders to export them to. Something I noticed however, is that these selected folders do not automatically get added to the ‘Recent Folders’ tab/list, which makes it harder to navigate to them afterwards to check something or to open another file.

I was wondering if anyone knows if there is a way to add a path or folder to the Recent Folders list through my scripts manually, since I cannot find anything about that on the scripting API.