better argument handling. added get_config_dir()