Improve getting plugin_dir