Correct search pattern

- Only edit files (using sed) with matches
Comments explain non-intuitive parts of patterns.