Draft: New way of calculating builddir & metaprefix
This MR builds on !238 (closed). It is mainly for @timlegge to see what i've done, and incorporate my changes into his MR if they are acceptable. So, i will close this later on to allow the improvements to be merged with the original !238 (closed).
Edited by Celeste