Properly decode URI components before use them.

see #481