Update sample script for RM integration

Capture the exit code so RubyMine doesn't continue to execute post-commit steps after failure