Use $CFG->wwwroot rather than constructing relative path

The relative path only worked on certain page levels (i.e. course main and
section pages).