Fixing BASIS autoreduction script.