Propoerly escape ruby string for javascript

Use the to_json method to escape, then remove the extra quotes, then escape the
' symbol
Merge pull request #128 from thescouser89/errata_rpmdiff

Propoerly escape ruby string for javascript