fix #401
make sure the target dir for leased shellsexists on CREATE_PARENTS in dir ctor
fix logical error on dir state recovery
add missing error check on mkdir
resolve conflict of fix in master and devel.  Aehem.
make sure the target dir for leased shellsexists on CREATE_PARENTS in dir ctor