Properly escape grouping in installation script

This fixes an issue where groups were not being captured and substitution.

    sed: -e expression #1, char 25: invalid reference \1 on `s' command's RHS