mkstemp creates a file. We want a directory
Merge branch 'current' of https://github.com/gloubibou/iMedia into current