Bug fixes.

Fixed a bug cause by once of the API calls to using nextTick before
calling handle on state machine.
Fixed a bug in the unit tests where a mock wasn't using callback style
even though we are expecting it and use Q.denodeify on that method.