Fix filesystem cache for PHP 5.6

Some weird behaviour in 5.6 caused fileperms to return the old permissions even after chmod had been changed.