Dup string before changing encoding because it might be frozen

Calling String#force_encoding! on a frozen string throws an exception.
By dupping the string we prevent this from happening.
Merge pull request #51 from github/dbussink/fix-logging-frozen-string-query

Dup string before changing encoding because it might be frozen