fix dir mode

Signed-off-by: Conke Hu <conke.hu@maxwit.com>