git.py: workaround osx interrupted system calls