Also add a newline to cat file if it didnt exist before, bug 376767