fix rewrite tests under Windows
Merge pull request #455 from niphlod/fix/test_rewrite

fix rewrite tests under Windows