Basic implementation of diff and patch is pure python