Fixed rotation transforms in util

In addition to merging in PR #39, this PR includes commit @8500d07, which fixes the lingering bugs in `util.py` with the rotation transforms