Python rdiff/rsync implementation (for experimental/learning purposes only)