Update gem folder calculation to work for ruby 2.0