Fix an error in learnBases.m and add support to separating iteration counter for three bases learning process. Also add backup of hpc script and corresponding top level matlab script to directory MGTools/hpcscript.