Add local cache for gems

Proposed fix for #1512, should drop internet requirement for remotebackend gems.