Move debug module to `lib/debug.js`

Fix gh-138