first (decent) version of build-cov.sh

Runs a build with code coverage options and then uses lcov to
create the reports.