Add smart data format detection

jgtr can now guess the format from the extension of the file, if none is
specified. In an ambiguous case, it still defaults to json.