Allow category_dir be an empty string and fix fallback to 'categories' if nil