If you get the error.semantic.ecmascript error, you probably forgot to quote the file name.
The file name is an expression, so you can create the name dinamically. So, if you want to save the audio to the file Record.wav, you need to quote it like:
'Record.wav'
In the e-mail sender component, when you attach a file, the file name is an expression too. So, you need to add quotes there too.
As a common rule, everywhere you have the expression editor button, what is in the left is an expression, and if you want a constant string, you need to add quotes to it.
Let me know if this helped.