FileCache._all_keys always tries to use _buffer

Hi,
thanks for your nice library.

I had a small problem when I enabled sync mode. `FileCache._all_keys()` will always try to use the `_buffer` instance variable, but `_buffer` is only available when sync is off. The methods `__contains__()` and `__iter__()` internally use `_all_keys()` and thus fail with sync turned on. My commit fixes the problem and adds a simple assertion to the tests that would have caught the problem.