Moved helper method to spec helper
Sorted out Coveralls for Ruby 1.8

Coveralls wants mime-types >= 1.x, but mime-types 2+ needs ruby 1.9.2+.
Depend on mime-types < 2.