Use File.basename with two arguments.
No longer include Rake::DSL.
Style.
No need to require 'rubygems/builder' here.
Use Gem::Package with RubyGems 2.0.0.