fixes issue #230.
Merge pull request #235 from stan-dev/feature/issue-230

fixes #230. bin/print outputs variables in row-major order.