changed JSON module import based on python version
made cache file checks case insensitive