Properly respect a:limit option

This bug causes huge lag when processing big number of files
because it keeps iterating over sorted list until the end when
we need only 'a:limit' number of top results.

Fixes #4