Just add the #newline after what you append. I believe if you save file instead of append it will erase what was in it =)
append to file("uids.txt", "{$find regular expression($scrape attribute(<id="content-single">, "innerhtml"), "(?<=uid=).*(?=&pid=)")}:{#namebegin}{#actnum}{#nameend}{$new line}", "End")
http://i50.tinypic.com/vq5bpd.png