Fix error callback arguments for wrapped promises as produced by `when`

The test I added demonstrates what I expected to happen. The following change in the module makes that test pass.

Please let me know what else the test should be checking for if this isn't the behaviour you had in mind.