First, just use List ( email1 ; email2 ; email3 ) for your output, this will automatically omit blank values and return a delimited list of values.
As for appending to an existing file, plugins like Troi File and Monkeybread allow you to append text to external files, however if you're dealing with a text file likst TAB or CSV, you can do something like the following:
Set Variable [ $file ; path to your file ]
Insert From URL [ $file ; table::tempField ]
Set Field [ table::tempField ; List ( table::tempField ; email1 ; email2 ; email3 ) ]
Export Field Contents [ table::tempField ; $file ]
Basically read the file contents into a temporary text field, append your values to it, then re-export it to it's original location. There might be some additional steps you need to take but it's possible. The plugins will allow you to append or substitute in the external file without having to read it in and rewrite the entire file each time.