Fixed magento root dir retrieval