adding better error-checking and exiting on error (so that the user know...

...s torch wasn't installed properly. Right now, even on failed install we often get Torch-7 was succesfully installed on the system.

This also helps with travis-ci knowing when an error really happened.