Retry if we get a OSError: [Errno 12] Cannot allocate memory. Closes #46