Merge branch 'fix/test-main-logic' into 'master'

BUG: Incorrect logic with regards to directory creation

See merge request !638
4 jobs for master in 0 seconds