Merge pull request #1164 from tiyowan/directory-helper-unit-tests

Add unit tests for directory helper