Support D3 when launching from an arbitrary dir

Prior to this fix the pre-packaged scrapbooks would not worked if i.js
was launched not from the i.js own directory. Example:

    $ cd /
    $ node ~/i.js/app.js

would cause d3 scrapbooks to fail. The reason:

    var d3 = require(‘d3’)

in these exampled wont be properly resolved. To address this issue I
have added ‘__base_dir’ and ‘__modules_dir’ that can be used for
resolving pre-installed node modules, like this:

    var d3 = require(__modules_dir + '/d3');