Patch to get it to work under ST3

Quick fixes, tested to work for the 'checkout' command. May need work
for other commands. NOT extensively tested