* fix if dir does not exist Signed-off-by: eraly <susan.eraly@gmail.com> * added simple test Signed-off-by: eraly <susan.eraly@gmail.com>