[CI] fix log collection in sanitizer tests
Currently, no logs are stored for the long sanitizer tests due to a bug in the used python scripts. This MR fixes that, so that the logs for the modes with errors only are stored in the artifacts. Addresses issue #290 (closed)
Edited by Jan Kiene