Check return code when calling subprocess and throw better error
closes #2898
Merge pull request #2989 from permcody/peacock_err_check_2898

Check return code when calling subprocess and throw better error