Make some test windows friendly.
Merge pull request #219 from PSyton/fix_for_no_dir

Make some test windows friendly.