Move and expand the vmx_path_is_valid function