add a debug function
wrap process.cwd
Move polyfills to separate file
A return to monkey patching

While monkey-patching is widely acknowledged to be the dirtier
approach in a case like this, it is simply the only way to ensure
that all cases of EMFILE errors will be handled properly.

Also, this replaces the FD-counting approach with a much simpler
queue system.  When an EMFILE is encountered, it goes in the queue.
When a file is closed, it tries to handle the next queued item.

Basically a rewrite, but much simpler.
v2.0.0