The installation of OS X Yosemite has failed. First Aid in Disk Utility reports directory damage but cannot repair it. What do you do next?

A.
Reinstall OS X using the Recovery System.
B.
Replace the hard drive.
C.
Erase the hard drive and then reinstall OS X.
D.
Restart the machine and download the OS X Yosemite installer again.
Explanation:
up to date answer.