move attributes_file tests to a separate file
test against #to_s rather than #groups
fix paragraph eating bug and add tests for ## headers