I am used to output CSV text in ANSI character encoding to Excel.
I don't know why you want to apply the UTF-16 character encoding.
The Mp3tag placeholder for the folder name of the current file is called "%_directory%".
See Mp3tag help manual for further export placeholders.
When the placeholder %_directory% is applied within the filename part of the export script's $filename function, then %_directory% contains the foldername of the first file in the given file list.
This works for me since years.
There is no problem with the trailing semicolon when importing CSV with text lines having a trailing semicolon (with german Excel 2007).
Make sure to import the CSV file by the Excel Textconverter Assistent.
There are additional options for the CSV import, especially about the character encoding and the data format for the columns.
Yes, I have forgotten to mention. that there is a quirk in the dialog "Export", so that the filename of the export script is not proper updated, when changed manually in the script.
Moving the selection bar up and down in the picklist should update the dialog field.
I do this already automatically, without thinking.