Exporters: add option to write in a deterministic location
Some use cases, such as building reproducible test datasets, require
exporting data in a deterministic location. This adds a config option to
exporters to make them always write in the same file.
It also refactors the shared logic to generate file UUIDs.