Fixing encoding errors and umask for an easier use with dokuwiki (and the mail server user that may differ from the script user