Fixed bugs in jim main and cacher file

Had syntax bugs in these files, also updated installer
to grand cache file write permissions.