fix double dot in the drive file name for hyperv

This fixes an issue in my previous pull request #4208 found by @ziyan and adds unit tests to cover the scenarios.