tnl-grid-setup does not check command-line arguments correctly

Running tnl-grid-setup --dimensions 2 segfaults:

Setting real type to   ... double
Setting index type to  ... int
The program attempts to get unknown parameter size-x
Aborting the program.
Aborted (core dumped)