Fix new-workdir (again) to work on bare repositories