Adding in Eric Prutt's rsync recipe from http://code.activestate.com/recipes/577518-rsync-algorithm/