Fix tests to use core.filemode correctly

Some windows tests were failing