return correct path for Sys.executablePath() when in macro (closes #3401)