Badges
Encoding header in all specs

Fixes Ruby 1.9 compatibility.
JRuby compatibility

SQlite3 won't work with JRuby, there are alternatives though.