Utility function to run npm scripts