Added smart checking of gems so jar falls back to local gem path