When you use REHack, you are running a script within the UI, like a large /script macro. No files are involved and REHack saves what you do to its SavedVariables.
If you want to run a script without REHack, go to
https://addon.bool.no to create a simple addon you can download and install like any other addon.