and improve `id` detection F = sanitize as filename (# = restricted) D = add Decimal suffixes Closes #2085, 2081