The PM agent session may be created with NULL permissions in SQLite,
causing 'external_directory' permission to fail.
Add fix_session_permissions() function that:
- Updates base session and PM agent session permissions in SQLite
- Sets external_directory pattern to '*' with action 'allow'
Add --fix-permissions flag to cmd_doctor:
kugetsu doctor --fix-permissions
This directly updates the opencode SQLite database to fix the permissions.
Fixes#36