parse_path_list() function added to ease directory handling provided from user input