Changed some requires to link to index.js instead of the lib name.

I also like the browserify version a lot better because now I can simply copy this into a CouchDB design doc and use it. The only problem is that erica cannot push for instance 'constants.js' AND the directory 'constants' (they resolve to the same property 'constants'). So if we require ./constants/index instead of ./constants this will work just fine.

Cheerio
Oscar