pysmbd: extract init_files_struct function