only log error if it's not ENOENT in purge_cache

we now also only catch OSErrors...

I'm tired of getting mails from the cron job...
catch errors while examining directory in purge_cache
don't step into nested directories in purge_cache
add some tests for purge_cache

refactor it a bit to make it easier to test