Fix initialisation in metrics_dao to ensure output directory exists