CLI: Error handling changes for the option parser

Currently, if you start `php-cli` with invalid options, the usage is shown; two things could be done better:
1. An error to be shown when an invalid option is used or in case of missing arguments
2. The process exit status should be non-zero to indicate an error

The latter in particular makes it easier to spot with `set -e`.