Fix parsing of optional values.

This is barely a semi-clean solution. The core problem is
--stagestats having an optional value, this only prevents
it taking values that start with '-'.