Cleanup directory and remove old plugins