FIX: 'self' is undefined in helper functions.

- d.debug should be used in 'run' function as opposed to 'self.debug'
Merge pull request #2 from spamwax/master

FIX: 'self' is undefined in helper functions.