file.blockreplace(append_if_not_empty): test for missing \n at EOF