prepareDirectoryForExport

Normalise and prepare an export directory.

Removes the directory when ExportTargetOptions.cleanup is true, creates it if missing, and returns the normalized path without a trailing slash.