new-workdir: handle rev-parse --git-dir not always giving full path