The only way to prevent an infection from a pedicure 100% is to do it yourself at home with instruments only you use. Going to a salon for a pedicure will always carry a risk of infection no matter how small.
My sister got a cut during a pedicure at a salon once and was so scared that she got infected with something. She got tested for Hepatitis and HIV just because she wasn't entirely positive that the person who did the pedicure had cleaned the tools after the previous customer.
If you do the pedicure at home and don't share your instruments and clippers with anyone else, there won't be any risk for infection whatsoever.