I'm very sorry but I have no experience with code like that. Where should I write it?
This is Unix shell code. You can use it within the Terminal app.
A simpler alternative is the finder way to replace the alias with the binary (therefore embedding or "hiding" it in the bundle).
It consists in two steps:
1. Open the bundle's contents with a context menu (by right klicking or ctrl klicking) using the entry "Show Package Contents".
2. Replace the alias in Contents/MacOS/ (within the bundle) with the original binary file outside the bundle.
See attached screen shots for additional information.