hotfixes after 20140714 release

Includes:

* add a shell / sql script to update stats tables (as we don't have a queue to do this yet) - this has to be a daily cron task
* fix a wrong call of `task_exists`