Properly handle single value CACHES locations
The `location` key in CACHES can either be a single value string or a list.
The code already attempted to wrap the value if it was not an iterable, but
since strings are iterables in python the logic was wrong.