Execution of a node package command not working on Ubuntu 12.04 RTS

I have created a npm package, Here is the package.json:

{
  "name": "docxgen",
  "version": "1.0.5",
  "author": "Hans Thunam <hans.thunam@gmail.com>",
  "description": "A docX Generator",
  "contributors": [ 
    {
      "name": "",
      "email": ""
    } 
  ],
  "bin":
  {
    "docxgen":"./docxgenNode/bin/docxgen"
  },
  "keywords": [
    "DocX",
    "templates",
    "Generator"
  ],
  "dependencies" : {
    "xmldom"   :  "0.1.x"
  },
  "devDependencies": {
    "jasmine-node":"1.10.x"
  }, 
  "license": "MIT",
  "engines": {
    "node": ">=0.8"
  }
}

Then I did sudo npm install -g in the folder of package.json, the installation worked correctly (no error nor warnings).

Howewer, when I then try to execute docxgen file.docx file.json, I get the response: File or command not found. What is strange about this is that it works on Windows 7.

Is there anything different to do for Ubuntu ?

The issue was about the character encoding of the ./docxgenNode/bin/docxgen.

The shell system didn't read the first line correctly.

I started from an existing working binary file that can be found here: https://github.com/LearnBoost/stylus/blob/master/bin/stylus