Better handling of plugin directory name, main script URL extracted as constant.