Fix generation of OutDir, IntDir, TargetName, and TargetExt element values to encode the values for XML.