Catch possible exception for os.makedirs.
Don't throw exception when dir exists.
Merge pull request #379 from leojay/master

Catch possible exception for os.makedirs.