Add output parameter support and test.

Could you write tests for the situations that you think wouldn't work?

What ID? Aren't parameters always matched by name?