Make bytes conversion on both path and name in unload_file. Also, add assert case in pluginmanager unregister_plugins to make errors more clear.