fix creation of new "foreign" file on Windows