The replacement was first done in another part in the code. You suggested to move it here.
No, not ready for merge yet, because I have not had a chance to test it. I had trouble with cloning the repo locally, because I made the initial commit via the web interface. I probably should not do that.
Anyway, I will fire up a VM, test this code, and let you know the result.
Current code is tested. I also had to replace @rpath. The problem with that @rpath is that it signifies multiple search directories that are specified in the executable. So to make this work in "the right way" would be a bit more involved. However, the current solution works at least with conda-based distributions; I just successfully freezed IEP using Pyzo :)