dir.c: clean up handling of 'path' parameter in read_directory_recursive()