Added functions to join pathnames and list files in a directory