Agent configs

Fixed directory methods, add data_directory to global_file.
if (!conf["data_directory"]) will cover more negative cases