Bugfix: putFiles failures with run_type = sudo

putFiles were failing with run_type = sudo, fixed it.