scripts: Replace exit() calls with sys.exit()