Properly raise exceptions for failed commands

(on Ruby 1.8)