Don't truncate filenames improperly