move cloning_checkout_mock.rb logic to rebuild_gemrpm.rb