directory fixes. unit test writer/reader fix