calcTime fix

Fixed bad code in calcTime function
Now temporary files are stored in %Temp% dir