Exit with non-zero for unknown commands.

Closes #2815.