added vfs_path_element_valid() function