Clone of http://drupal.org/project/pareviewsh to support exit codes