Refactored Pre-formatted tag logic

While testing, I found that new lines before pre-formatted tags were also being trashed. I was successful in implementing logic to preserve ending new lines, but instead, I implemented code to take care of both cases easily. I hard-coded `sb.append("\n")` before and after the append of the pre-formatted elements. This formats all the files in trunk correctly following our earlier rule of nesting our pre-formatted content in `<p>` tags.