Implemented a set of integration tests for dap_daily_stats. Fixed one bug along the way.