Matrix properties should be CGI escaped

`URI.escape` has been deprecated:
http://stackoverflow.com/a/2832003

Furthermore URI.escape and does not properly encode things like plus
signs (`+`) which should be turned into a `%2B` while actual spaces
should be turned into a `+`!