Strip folder prefixes, write prefs.