Fixes bug of file exists with different mode
Merge pull request #4 from oklasoft/makedir_fix

Fixes bug of file exists with different mode