Merge pull request #219 from PSyton/fix_for_no_dir

Make some test windows friendly.
Fix #211. Try to create folders for logs.