[processing]fixed bug with wrong characters in output filenames

refactored to reuse string cleaning function