Fix installation of core plugins

This prevents the 'plugin.jpi.pinned' file
from being deleted.
Fix test.

Fixes broken tests for #188