adusted sed commands to keep from generating unneeded backup files.