Well, usually doing anything from a root account is not recommended, so it depends on what you are doing that needs a folder outside a user folder. If you don't absolutely need root access, then placing a new folder in your user account should be all you need. If your script is just creating a folder somewhere, then there may just be a problem in the way you are getting or using the name.