Fix parsing of CSR files for dense matrices

Decided to parse the header of the CSR file and then only read in the
declared number of elements.
Fix minor bugs