chmod to gs_chmod & fixes #895