Fix default parameter value handling.

Now checks 1) for whether default is included, since a default of false
would have previously screwed up the check. 2) Checks to see if the
parameter is a flag type, and if so, it sets the parameter to false if
not already set and no default is provided.