Replace tools.message_exit() with sys.exit()

sys.exit() can print an error and send the appropriate error status to the shell.

Edited by Moul