Fixed bug if cache directory comes back as None.