Read and write files containing key-value paragraphs