Added --insecure to curl log, Content-type json when the query is in json, Default to /root if no $HOME is set when searching for a .fifo file, Added more tests