A South African court has denied former Zambian President Edgar Lungu's family's appeal to bury him in South Africa.