It sounds like something is changing permissions on those files. Nothing in the scripts change permissions on the files/folders that already exist.

What are the permissions set to when you have to change them, is it the files or the folders that have the wrong permissions, or both?