Mutex around gem installation, as rubygems api is not threadsafe. Better solution to come.