Update index.js

refreshToken function was erroring since self, oauth, regOpts were uninitialized.
Merge pull request #42 from scottanson/patch-1

Update index.js