Cache RubyGems and NPM packages.
Merge pull request #1597 from rjackson/add_caching

Cache RubyGems and NPM packages.