Leeds ensured their survival thanks to Rhyse Martin's kick, beating Wigan in their Super League playoff eliminator.