BLD: fixes error in tests on amd64 (because of open file handle)