fix run_command: restore umask correctly