[Locale] fixed build-data exit code in case of an error

When passing a message to the exit() function, PHP returns 0 instead of
an error code.