Implement home directory detection by using plink to send a pwd command