replace create_dir with equivalent os.makedirs

also fix race condition in user-only permission setting
Merge pull request #419 from juliantaylor/permission-race

BUG: weave: replace create_dir with equivalent os.makedirs