Add control to mkdir db and cache directory.
Merge pull request #4 from j4/master

Add control on mkdir db and cache directory