Expand %(foo) escape sequences in strings