core: filetransaction: Always add a newline

Always add newline when the content is a non-empty list or tuple.
Without this change, files that have an empty last line, and are edited
by reading them with read().splitlines(), changing some lines, and then
writing them with filetransaction, loose their empty last line.

Change-Id: I97f0feef1c003250c9f7453245f68398c64051cd
Signed-off-by: Yedidyah Bar David <didi@redhat.com>