Merge pull request #1 from acseo/master

Use a real temporary directory if the __DIR__ path is not writable
mkdir : file exist() silent warning and logical tests
Merge pull request #1 from npotier/patch-1

Patch 1