Even though this is a nearly 2-year-old question, for anyone who comes across this issue, the following is the remedy;
Remove the '.' in front of './db' of the following lines;
if(!is_dir(__DIR__.**'/db'**))
mkdir(__DIR__.**'/db'**);
if(!defined('db_file')) define('db_file',__DIR__.**'/db/plan_db.db'**);