fix daemon tests and add coverage script