CORE-4837: prevent spaces from appearing in output folder names