Removed extra 'Map cache is corrupted' message

- The message was unconditionally displaying, regardless of errors.

Signed-off-by: Haru <haru@dotalux.com>
Improved the self-test script

- Moved tests into a function, so that they can be easily called by
  external scripts. Ensured that the tests are only executed once.

Signed-off-by: Haru <haru@dotalux.com>
Added support to return a different exit status to the OS.

- This can be easily used by plugins.
- See an example at
  http://github.com/HerculesWS/StaffPlugins/Haru/script_mapquit

Signed-off-by: Haru <haru@dotalux.com>
Return EXIT_FAILURE if a script parse error occurred.

- This affects normal execution as well as ./script-checker runs.

Signed-off-by: Haru <haru@dotalux.com>
Updated Xcode build script to support the recent sysinfo addition

Signed-off-by: Haru <haru@dotalux.com>