Fixes so tests should work out of the box for generated plugins.
Change compile rule for ts to use a script rather.