Fixes for windows environment: 1) copy empty directories when cloning (since git occasionally has a refs directory with no files in it - if the directory is not present, then git does not believe it is a git repo) and 2) change order of git rev-parse arguments to match git docs