Remove `shorten_filenames` (dead code)
`shorten_fname`: Add unit tests
`shorten_fname`: Add guard conditional
`shorten_fname`: Initialize variables on definition
`shorten_fname`: Move conditional
`shorten_fname`: More refactoring