Aberdeen's back-to-back wins over Kilmarnock and Hibernian have moved the club to the brink of Premiership safety.