Any time we manipulate filenames with string substitution, I feel nervous.  Can we use the `pathname` library to achieve the same result with a file-aware library instead?