Fixes call stack size error

This PR adds a test reproducing the error reported in [#68](https://github.com/Baggz/Amanda/issues/68), and the applies a fix for it (adapted directly from [#32](https://github.com/Baggz/Amanda/pull/32), which would no longer merge cleanly).

I'm also sending a PR with the same three commits on [Baggz/Amanda](https://github.com/Baggz/Amanda) I'm not sure which is "canonical" anymore; this repo is what's referenced by [apiaryio/gavel.js](https://github.com/apiaryio/gavel.js), but Baggz's has all passing tests (whereas this has several failing).

Thanks!