Fix handling of files with question mark in the name.