You should use OptionNumber() because you're testing against 0, 1 and 2.
The default should be 0.
The name is not consistent with the function of the option, name it action_on_unwanted_extensions.
(Yes, I realize that similar options are also named incorrectly, that's because of
historic and backward-compatibility reasons.)