fix getopt return value type

getopt returns an int, not a char (and ARM chars are unsigned by
default).
Merge pull request #1 from arno/fix-getopt-return-value-type

fix getopt return value type