Revert "LPS-46160 Revert this one condition back to the old style because it breaks in certain situations with our current scripting approach (see LPS-46251)"

This reverts commit 706bf69e26f872b810cc26cc4fb9d803cff5a998.
LPS-46160 Use module.dir.unix because that's the full path