I have created and tested an updated script which will generate code coverage report for all modules. You can find code in below link:-
https://gist.github.com/shubhendras11/d366717985ca5eae776bfbb153c5d1a0