Properly deal with multiline fields

Handle multiline fields in a generic way, and somewhat simplify the loop for parsing the commit content. 

Closes issues #3 and #4.