Changes to the coverage script to get it working in Jenkins