**Nigeria's two main presidential candidates have signed an agreement to prevent violence in tightly contested elections due on Saturday.