Plugin install endpoint: slug should never be empty

the plugin slug could have been empty if the plugin was a single file,
and not stored in a directory