move the ARG_PATHNAME logic out into files.c