Changes to inreplace and fix bzr patch issues.