Updated $basePath to find the extension folder name dynamically