Ensure that flush=1 only causes an actual flush if one of the following is true
Fixes #1692. This is the version for 2.4. The version for 3.0 is at #2243
Move getTempFolder out of Core.php to own file
FIX Prevent DOS by checking for env and admin on ?flush=1 (#1692)
This should be ready to go now, but needs checking in PHP 5.2
Doh, I merged this without noticing an issue. require_once(core/TempPath.php): doesn't exist in 2.4 and it's trying to include it.
Flush - there's two requests, and the first one creates TempPath.php