Checks if oEntry is a dir, if yes, does not unlink. Instead also delete ...

I've used this part of code in a OXID CE 4.9.1 and unlink was generating error messages because it tries to delete a directory. Instead of suppressing the errors with @ this code now checks if there is a directory. Also in Version 4.9.1 inside the tmp folder there is another folder "smarty", now this also flush.