Would be nice to make it possible to select a specific directory instead of file.
There doesn't seem to be possible to open a file picker for both directories and files in NWJS, so toggling between file and directory seems suitable.
Another option would be to create a new type in CDB, TDir. Don't know which one would be preferable.