Fixed a few errors arising with the 'git' command and exception handling.