Some fixes for the kramer module for python 2.7

Plus some changes to try and get the correct prefix and suffix for the
matrix name. I still can't figure out how k-router does it.