refactored traverse_folders_for_vm due to erratic results
fixed vm query to support VMs in subfolders