Addressed a compilation warning generated on macOS by refactoring the error handling in tns_cache_write. The code now directly checks the return value of directory creation rather than incorrectly assigning it to an Imlib_Load_Error enum, which caused signedness comparison issues. This minor structural cleanup ensures directories for cached thumbnails are created properly without silent failures.

Fix signedness comparison issue in thumbnail caching - zhengqunkoo/sxiv