title: "Could not get current working directory" error on git clone
body: <p>I try to clone a Git repository hosted on a VSTS instance in a PowerShell script to a network share:</p>
  
  <pre><code>git clone https://user:password@mycompany.visualstudio.com/DefaultCollection/MyProject/_git/MyRepository \\MyServer\MyBackupDirectory\MyRepository --mirror
  </code></pre>
  
  <p>While this works fine run from my local machine it fails while run on another machine (VSTS build agent) with the following error:</p>
  
  <pre><code>fatal: Could not get current working directory: No such file or directory
  </code></pre>
  
  <p>The same error is thrown if I run the above command directly in PowerShell. I don't see how this could be related to the working directory. I suspect that it has something to do with permissions on the target file share, but the user has full control on the target path and with the same user I can manually create / delete folders in the target path.</p>
  
  <p>Opposite to <a href="https://stackoverflow.com/questions/25138228/git-fatal-could-not-get-current-working-directory">Git - fatal: Could not get current working directory?</a> I also don't change working directory or delete directories.</p>
  
  <p><strong>Update:</strong> 
  If I don't clone with <code>--mirror</code> an empty directory is created on the target file share and I get the following errors:</p>
  
  <pre><code>fatal: Could not get current working directory: No such file or directory
  Deletion of directory ´\\MyServer\MyBackupDirectory\MyRepository´ failed. Should I try again? (y/n)
  </code></pre>