index: match the strip shebang logic from lib/module.js