Fixes #3045.
So you now get $ nix build error: path '.' is not a flake (because it does not reference a Git repository) rather than $ nix build error: unsupported argument '.'
E.g. 'nix path-info ./result' inside a flake directory now works again.