fix bug with calculations in coverage.pl and improve output format