Update generate_html_report.pl

Added Adam's sort_dates function to deal with incorrect sorting behaviour.