pushd: ensure that the exit code is emitted before the stream ends

`pushd`s exit code was being emitted after `tr.queue(null)`, which caused the exit code to always be `0`. This change also ensures that all test implementations for `exists` are deferred via `lib/next_tick.js`.