Made variables local in scope

* src/rmatio.c: Variables are made local in scope. Loop indices are
  made local to the loop.