Directory creation for cached images