Added unit test for directory-based aggregation