Add require.paths support

I've spent the past week or so trying to understand the code enough to provide a fix for this, and I feel as though I've finally got everything working the way it should.

The goal here is to try to achieve a better implementation of the CommonJS standard by adding the `require.paths` array so that custom paths can be allowed.

Ref: n1k0/casperjs#462 #11339