in reply to change owner & mod

mkpath uses mkdir which modifies the permissions with your umask.