Startup: Prevent potential loop in bin/elasticsearch

If bin/elasticsearch is started with a single --long argument, it could
potentially be caught up in a loop on bash (dash handles this correctly).

This commit adds an additional check that prints out an error message

Closes #7104