fix dir function
Merge pull request #4 from smjkzsl/branch

fix dir function