Improved url decoding to cope with spaces