Format directory block correctly