lru_cache_file now only write dirty blocks

Signed-off-by: Tim Henderson <tim.tadh@gmail.com>