Only remove old rubygems files upon install

When installing RubyGems 2+ the old files rubygems/builder.rb and
rubygems/format.rb are deleted.  Unfortunately the check was not
specific enough and RubyGems would delete all non-rubygems files as
well.

On JRuby this would delete most of the standard library.  Additionally,
RubyGems defaults for third-parties would also be deleted.

Now RubyGems only deletes non-defaults files inside the rubygems
directory.

Fixes #504

Fixes #507