Why does Edo Tensei Madara have Rinnegan?
First of all, the Edo Tensei doesn't just restores the body at the exactly time of death, but it does it as if it was brand new, the body is kind like 'reborn'. We see it on how: 


Edo Tensei Deidara had both eyes instead of his robot left eye;
Edo Tensei Sasori had a 'human' body instead of a puppet one;
Edo Tensei Nagato had his Rinnegans even tho Tobi had taken his eyes from his body; 
Edo Tensei itachi had his Sharingans even tho they were transplanted on Sasuke.


Now when it comes to Madara, Kabuto had aprimorated the Edo Tensei Jutso so when he brought Madara back to life he was younger and stronger than he was when he died.

Here's the image after he showed everyone that he has a pair of Rinnegan. Kabuto mentions that he made modifications to the body.