Cleanup function missing its purpose

This is a two cleanup function which is called by several other help functions totally missing its point.
At the stage cleanup is being called $TEMP holds the environmental value which in Windows would be /cygdrive/%windrive%/Users/%USER%/AppData/Local/Temp.
Trying to remove this directory would:
a. miss its purpose
b. fail
c. not recommended

Fix is to delete all ap/tmp* directories instead.