Fixes for custom datadir setting use case
Merge pull request #46 from jesseadams/custom_datadir_fix

Fixes for custom datadir setting use case