fix format guessing in Chooser::addFile()