Rewrote ByteVector::replace() simpler
Merge pull request #309 from TsudaKageyu/fix-replace

Rewrote ByteVector::replace() simpler (fix for the issue #308)