Test module improvements

Allows the module test runner to:

1. dump the generated module file
2. take json string as complex args to module