Fix file history graph generation
Review Request #7328 — Created May 21, 2015 and submitted
Previously, file history graphs would generate incorrectly when the
file history contained deleted files. This patch corrects the behaviour
and adds unit tests to cover it to ensure that it does not regress.
Ran unit tests.