Updated to make more meaningful approximations to package name and class name:
- Package name: test source folder
- Class name:   test source file base name (i.e. minus ".c" extension, which was confusing jenkins)

Minor refactoring to reduce duplication.