New Zealand tried to deport attacker as refugee