fixed mage setup; some dir get not correctly installed if MROOTwas set; mage_setup was called too early