This fixes the confusion between paths which were URL encoded and paths which weren't. In particular it allows files to have % in the name.