fixed many bugs in rdiff.helper