Extracts matrices from Gaussian log files and writes them to a text file.