[minor fix] Replaced exit(1) with exit(EXIT_FAILURE) for portability.
[minor fix] Replaced exit(1) with exit(EXIT_FAILURE) and exit(0) with exit(EXIT_SUCCESS) for portability.

Note: There is an exit(-1) line 43, this is a non standard exit value and it is usually turned into "255" by the system. This should be checked.
Merge pull request #147 from OHamm/master

Minor exit() changes.