Add closure detection WiP

Despite having created a much smaller test I'm still seeing this error on the tests:

![1__bash](https://cloud.githubusercontent.com/assets/1514/5494713/fbaccec8-86ee-11e4-8203-77256aeac320.png)

Running the test on its own passes.

@kumar303 any thoughts on what might be causing it?
For now, just change ``function processWebPayment () {}`` to ``exports.processWebPayment = ...``. I'd like to keep it consistent. We can fix all the exports all at once.