Urldecode extra links before getting pathname from links
Some extras had spaces in filename. This caused url encoded character %20 to be used instead of space in filenames.