Check if $cached is not a directory to avoid error on unlink
Merge pull request #146 from caravane/develop

Check if $cached is not a directory to avoid error on unlink