Refactor clearstatcache into a new method which uses the path param on php >= 5.3