Yes, that was a typo. I did set a bunch of debug in the script and everything looked fine with the path being passed.
what could the umask do? If I create a file I own, I can't see how a umask would prevent then editing that file myself. Maybe I'm missing something... I will check it, though; and see what's happening there.