Fixes to the plugin to make it work with wordpress, mainly in purge_all function in purge.php