Improved bash completion when using tools like '-t clean'

When using 'ninja -t clean <tab>' bash would not complete properly and would give errors about unknown commands.

The needed options were introduced into getopts to fix this.