Optimize file transfer tests in test_vm.py