Fixed data directory bug, now using get_global_data_path(), and TMP directory