Fix tmp dir issues with babun/cywin

This patch allows the script to run without erros on babun/cygwin.