Fix #149

Three things are changed here:

rank is replaced with ndim (numpy)

tril/diag/triu now return an array rather than a matrix, so asmatrix is
used to force matrix for consistency with other tests.

whitespace police
Trying coveralls
Fixing coverage
more travis fixes
broken coverage
Change to sudo for travis
Fix coverage typo.  aggggggggg