Allow using detox, and fix/refactor collection of coverage reports Closes #844 See merge request !1051