[tests] Make dir_init reusable
[tests] Test for directory entry creation
[tests] Add subdir test and some stub tests