The GUI script solution would be:
tell application "System Events" to tell process "Safari"
tell window 1 to tell sheet 1
key code 5 using {shift down, command down} --shortcut for go to folder
tell sheet 1
set value of text field 1 to <POSIX path to targetfolder as text>
click button 1
end tell
end tell
end tell