Fixed crash when working directory has spaces

This is a fix for issue #191. I added quotes around a few of the arguments in the calls to `git`. They definitely fixed the error I was experiencing, and should do no harm, though the other invocation of git should be tested as well. I didn't test that case.