utility code to add prefix/suffix to every line in a file