wrap long error message
use String.sub instead of String.gsub

no need for global replace, if there is more than one Attributes
section, the result will be wrong anyway
escape attributes file input when replacing

Using multiple files with lots of normal ruby syntax sometimes causes
weird interlacing of the attributes output and the repeated <after>
section from the README.md file. I haven't been able to figure out where
this comes from exactly, but this is a fix :|