Split directory_handle_command_get into per-command functions