Fixed auto generation when Magento is in a subfolder - fixes #2