Check if directory exists before creating, and set a proper mode

While this worked on Windows, on UNIX, if the directory already exists, the mkdirSync would fail. Also null (0) mode was being set which creates a directory with no permissions for anyone (including the creator) to read or write, so we use standard 0755 permissions.
Merge pull request #29 from gillius/patch-1

Fixes #26: Check if directory exists before creating, and set a proper mode