Fixes for karma test scaffold generation. Fixes #168

This fixes #168