Make ExtensionLoader paths code more robust