Use Gem::Specification to find gemname instead of deprecated Gem::Format

-- Since Rubygems 2.0 removed Gem::Format, we can't use this class in
   code as it is throwing error when trying to create srpm