Does anyone know if there is a way to do this with Applescript?
I think you can do this through any scriptable audio-transcoder-able app, such as Audion or Sound Studio. A quick sample with Sound Studio:
set smil to alias "HD:folder:somefile.sfil"
tell application "Sound Studio"
open smil
repeat while not (exists document "somefile.sfil")
-- wait until opened
end repeat
save document "somefile.sfil" in (choose file name) as "AIFF"
end tell