adding better error-checking and exiting on error (so that the user knows torch wasn't installed properly. Right now, even on failed install we often get Torch-7 was succesfully installed on the system