blockreplace: append_if_not_empty ensure \n before mark
file.blockreplace(append_if_not_empty): test for missing \n at EOF
Merge pull request #11137 from ze42/dev_blockreplace

blockreplace - ensure newline before appending