move the cache path building code into rubygems
add ruby 2 cutoff for specs
cache gems even if they are ruby builtins