GetEmitOutput function and testfiles

You shouldn't need to do typeCheck.. EmitFiles takes care of that.