KAMPALA, Uganda — Inside the immigration office in Tel Aviv, Yohannes Tesfagabr considered his options. He could not return to Eritrea, a country he risked his life to flee in 2010. He hoped to avoid the fate of compatriots who languished in a desert jail for illegally staying in Israel.