Check for negative number of rows and columns

The program can hang for long periods of time if a negative value is set
for the number of rows or columns. Check if this is negative after
parsing the command line options and show an error if they are.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>