ensure dir exists first.
Merge pull request #65 from fengmk2/config

ensure dir exists first.