Correctly fetch file names from URI