Fix a bug with the exit status codes.

The script was always exiting with 0 for success, rather than returning
a specific status code for the battery charge status.