How to execute / access local file from Thunderbird WebExtension?

Hi. I like to write a Thunderbird AddOn that encrypts stuff. I already had success in writing the basic GUI. For encryption, I extract all data from the compose window. Now I have to save this into files and run a local executable for the encryption. But I found no way to save the files and execute an executable on the local machine. How can I do that?

Alternatively, if execution is not working at all, I am able to put the functionality into a .DLL/.SO in the addin folder structure. Am I able to call .DLL/.SO functions from the WebExtension AddIn then?

I found the File and Directory Entries API documentation, but it seems to fail. I always get undefined while trying to get the object with this code:

var filesystem = FileSystemEntry.filesystem;
console.log(filesystem); // --> undefined

At least, is there a working AddOn that I can examine to find out how this is working and maybe what permissions I have to request in the manifest.json?

NOTE: Must work cross-platform (Windows and Linux).

I think it may be possible to use a WebExperiment to execute files etc. I managed to run a test with WebExperiments. But how do I access file i/o functions from within the WebExperiment code now?

It says I can use any builtin Thunderbird functionality, but where to find the available functions?

The best place to ask development questions is here:
https://thunderbird.topicbox.com/groups/addons