Use plugin_dir_path WordPress function instead of dirname function.