fix typo in menu-cache-gen.c
fix memory corruption when freeing cache->files

cache->files may be not NULL-terminated if read_all_used_files() gets some not existant files at the end of the list. That causes memory corruption when calling g_strfreev(cache->files).

valgrind log:
==13360== Invalid free() / delete / delete[] / realloc()
==13360==    at 0x4029E98: free (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==13360==    by 0x4262EEF: g_free (in /usr/lib/libglib-2.0.so.0.3600.4)
==13360==    by 0x804A604: on_file_changed (menu-cached.c:399)
==13360==    by 0x44CD4B5: ffi_call_SYSV (in /usr/lib/libffi.so.6.0.1)
==13360==    by 0x44CD23A: ffi_call (in /usr/lib/libffi.so.6.0.1)
==13360==    by 0x41D6450: g_cclosure_marshal_generic_va (in /usr/lib/libgobject-2.0.so.0.3600.4)
==13360==    by 0x41D5AAD: ??? (in /usr/lib/libgobject-2.0.so.0.3600.4)
==13360==    by 0x41EE34A: g_signal_emit_valist (in /usr/lib/libgobject-2.0.so.0.3600.4)
==13360==    by 0x41EEF12: g_signal_emit (in /usr/lib/libgobject-2.0.so.0.3600.4)
==13360==    by 0x40A8B28: ??? (in /usr/lib/libgio-2.0.so.0.3600.4)
==13360==    by 0x4259DEF: ??? (in /usr/lib/libglib-2.0.so.0.3600.4)
==13360==    by 0x425D0DD: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.3600.4)
==13360==  Address 0x46713c0 is 0 bytes inside a block of size 44 free'd
==13360==    at 0x4029E98: free (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==13360==    by 0x4262EEF: g_free (in /usr/lib/libglib-2.0.so.0.3600.4)
==13360==    by 0x804A6C4: cache_file_is_updated (menu-cached.c:421)
==13360==    by 0x804ACAE: on_client_data_in (menu-cached.c:598)
==13360==    by 0x42A04E4: ??? (in /usr/lib/libglib-2.0.so.0.3600.4)
==13360==    by 0x425D0DD: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.3600.4)
==13360==    by 0x425D487: ??? (in /usr/lib/libglib-2.0.so.0.3600.4)
==13360==    by 0x425D8EA: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.3600.4)
==13360==    by 0x43329D2: (below main) (in /usr/lib/libc-2.18.so)
==13360==