The obvious way to do it is to leave the script step open and let the user select a folder that way.
The other way is to use the "Get Directory" script step to let the user select a folder / create a folder. Then you would need to use "show custom dialog" to let the user type in a name. With both these pieces of information you can then use the "export field contents" to write the file out.
I would dialog the user for just the file name. Set a variable to your desired path with the file name appended, and then save to that path variable with no additional dialog.