fix sed substitution so that spaces in configuration variables are handled correctly