Check $TEMP before using /tmp

Windows doesn't have /tmp