(NC-169) fix node format returned to puppet

We weren't returning class parameters or variables correctly. This fixes that and adds an integration test that would have caught the problem.