Fix appdir settings in Plugins and API module.