Move report logic into a module

The methods defined within a rake task pollute global space. Thus, `format`
was defined on the top level object, and when RuboCop calls its own
`format` function things were blowing up.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.