DNG export would be nice, although, as I understand it, X3F files contain raw sensor data (light levels at three different depths in the silicon), not RGB data.
To store the image in a DNG file, it would have to be stored as a Bayer mosaic or as an RGB linear image. Only the latter is an option for a foveon sensor, which means data would have to be processed first, i.e. it would not really be raw (not sure whether it would matter).