Hi François,
which kind of plugin do you develop ?
is it a question type ?
(the lib.php is in the root of the plugin not in a sub directory of the plugin)
In fact for question type you don't need the function in lib.php.
Moodle can ask you to remove the directory manually. But try to be sure that the group/owner of the directory is www-data:www-data
and the access right should be 775
Dominique.