properly fix umask handling