add db_dir setting support for leveldb backend.

fix #2