Fix crash when `git` command is not available

A missing `except:` clause caused pylearn2 to crash the moment a class is constructed when git is not installed.