Added two tests that ensure that writing comments doesn't corrupt files.