Judge gave excessively light sentence to avert deportation of refugee who threatened to kill police: appeal court