Bug 250 and bug 259 fixes for master branch. Plus race cond. in Mmakefiles

Please consider these commits as part of fixing [bug 203 related with DESTDIR](http://bugs.mercury.csse.unimelb.edu.au/view.php?id=203) and [bug 259 related with libdir and others](http://bugs.mercury.csse.unimelb.edu.au/view.php?id=259).

As well there is fix for race condition raised on my platform during build with -j9. Issue caused by the fact of relaying on effect of "chmod a+w" while in parallel there is a chance of "chmod a-w" (see last commit itself). Actually this is probably an exposure of other problem caused the fact that each rule fired several times for each of $(MDBCOMP_MODULES). But this at least makes it go through build without loosing "-j9".