only override MAGE_RUN_TYPE and MAGE_RUN_CODE if they have not been set already
fix magento store base_url handling when updating store configuration