Fixing newline escapes in lineinfile

Fixes #5679