node-packages: Fix generate when running from a different directory.
node-packages: Fix generate when running from a different directory.

Previously it would try to run the build before changing directory which would fail to find the nixpkgs default.nix.

Also simplified the script a little to remove the variable that was only used to change directory.

NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs