In case we get a Pathname object instead of a string, convert to string to avoid error on next line