Getter and Setter for flags

I created a simple getter and setter for flags, so that you can change flags after Command initialization.
I've also added some unit tests.

Note: I tried to match your coding style