If you want to modify the file in place, you can run
sed -i '1!G;h;$!d' filename
This removes the need to create a temporary file and then delete or rename the original and has the same result. For example:
$tac file > file2$sed -i '1!G;h;$!d' file$diff file file2$
Based on the answer by ephemient, which did almost, but not quite, what I wanted.