decode URI to handle spaces in filenames.