move db_dir and log_dir variables to config file together with migration_dir

It seems odd that 'migration_dir' is in the config file but db_dir and log_dir are defined as constants.
this pr put all of them together in the config file to be defined by the user. Also error is generated if they are not set by the user.
Thanks