battery plugin: Use walk_directory().